This is a Mill Plugin similar to the most useful SBT Plugin you ever saw for Scala Modules.
The plugin is available since Mill 1.0.5 and tested against Scala Versions
| Scala |
|---|
| 2.13.18 |
| 3.3.7 |
| 3.8.2 |
| For older versions compatibility see the tests results |
Set up the plugin at your build.mill:
//| mvnDeps: [
//| "digital.junkie::mill-explicit-dependencies:$MILL_VERSION"
//| ]
object myproject extends ScalaModule with ExplicitDependencies {
// [optional] filter out unwanted results
override def undeclaredCompileDependenciesFilter: Seq[Dep] = Seq.empty
override def unusedCompileDependenciesFilter: Seq[Dep] = Seq.empty
override def undeclaredCompileModulesFilter: Seq[Module] = Seq.empty
override def unusedCompileModulesFilter: Seq[Module] = Seq.empty
}Run the tasks:
# find all undeclared dependencies
mill __.undeclaredCompileDependencies
# fail if there are undeclared dependencies
mill __.undeclaredCompileDependenciesTest
# find all unused dependencies
mill __.unusedCompileDependencies
# fail if there are unused dependencies
mill __.unusedCompileDependenciesTestPlugin version are aligned with Mill's versioning, i.e. $MILL_VERSION may be used. Plugin's bugfixes are delivered as x.y.z.λ.
| Test Result | Scala |
|---|---|
| FAIL | 2.12.0 |
| FAIL | 2.12.1 |
| FAIL | 2.12.2 |
| FAIL | 2.12.3 |
| FAIL | 2.12.4 |
| FAIL | 2.12.5 |
| FAIL | 2.12.6 |
| FAIL | 2.12.7 |
| FAIL | 2.12.8 |
| FAIL | 2.12.9 |
| FAIL | 2.12.10 |
| FAIL | 2.12.11 |
| FAIL | 2.12.12 |
| FAIL | 2.12.13 |
| FAIL | 2.12.14 |
| FAIL | 2.12.15 |
| FAIL | 2.12.16 |
| FAIL | 2.12.17 |
| PASS | 2.12.18 |
| PASS | 2.12.19 |
| PASS | 2.12.20 |
| PASS | 2.12.21 |
| FAIL | 2.13.0 |
| FAIL | 2.13.1 |
| FAIL | 2.13.2 |
| FAIL | 2.13.3 |
| FAIL | 2.13.4 |
| FAIL | 2.13.5 |
| FAIL | 2.13.6 |
| FAIL | 2.13.7 |
| FAIL | 2.13.8 |
| FAIL | 2.13.9 |
| FAIL | 2.13.10 |
| PASS | 2.13.11 |
| PASS | 2.13.12 |
| PASS | 2.13.13 |
| PASS | 2.13.14 |
| PASS | 2.13.15 |
| PASS | 2.13.16 |
| PASS | 2.13.17 |
| PASS | 2.13.18 |
| FAIL | 3.0.0 |
| FAIL | 3.0.1 |
| FAIL | 3.0.2 |
| FAIL | 3.1.0 |
| FAIL | 3.1.1 |
| FAIL | 3.1.2 |
| FAIL | 3.1.3 |
| FAIL | 3.2.0 |
| FAIL | 3.2.1 |
| FAIL | 3.2.2 |
| FAIL | 3.3.0 |
| PASS | 3.3.1 |
| PASS | 3.3.3 |
| PASS | 3.3.4 |
| PASS | 3.3.5 |
| PASS | 3.3.6 |
| PASS | 3.3.7 |
| PASS | 3.4.0 |
| PASS | 3.4.1 |
| PASS | 3.4.2 |
| PASS | 3.4.3 |
| PASS | 3.5.0 |
| PASS | 3.5.1 |
| PASS | 3.5.2 |
| PASS | 3.6.2 |
| PASS | 3.6.3 |
| PASS | 3.6.4 |
| PASS | 3.7.0 |
| PASS | 3.7.1 |
| PASS | 3.7.2 |
| PASS | 3.7.3 |
| PASS | 3.7.4 |
| PASS | 3.8.0 |
| PASS | 3.8.1 |
| PASS | 3.8.2 |