diff --git a/contrib/package.mill b/contrib/package.mill index d11cc3a0132..358fab60aee 100644 --- a/contrib/package.mill +++ b/contrib/package.mill @@ -126,11 +126,13 @@ object `package` extends RootModule { // Worker for Scoverage 2.0 object worker2 extends build.MillPublishScalaModule { - def compileModuleDeps = Seq(build.main.api) - def moduleDeps = Seq(scoverage.api) + def compileModuleDeps = Seq( + build.main.api, + scoverage.api + ) def testDepPaths = Task { Seq(compile().classes) } def compileIvyDeps = Task { - Agg( + super.mandatoryIvyDeps() ++ Agg( // compile-time only, need to provide the correct scoverage version at runtime build.Deps.scalacScoverage2Plugin, build.Deps.scalacScoverage2Reporter, @@ -138,6 +140,7 @@ object `package` extends RootModule { build.Deps.scalacScoverage2Serializer ) } + def mandatoryIvyDeps = Agg.empty[Dep] } } diff --git a/kotlinlib/package.mill b/kotlinlib/package.mill index 2913cb65eb2..50df85efc6f 100644 --- a/kotlinlib/package.mill +++ b/kotlinlib/package.mill @@ -45,11 +45,13 @@ object `package` extends RootModule with build.MillPublishScalaModule with Build ) object impl extends MillKotlinModule { - override def moduleDeps: Seq[PublishModule] = Seq(worker) - override def compileIvyDeps: T[Agg[Dep]] = Agg( - build.Deps.osLib, - build.Deps.kotlinCompiler - ) + override def compileModuleDeps = Seq(worker) + def mandatoryIvyDeps = Agg.empty[Dep] + override def compileIvyDeps: T[Agg[Dep]] = + super.mandatoryIvyDeps() ++ Agg( + build.Deps.osLib, + build.Deps.kotlinCompiler + ) } } } diff --git a/main/util/src/mill/util/CoursierSupport.scala b/main/util/src/mill/util/CoursierSupport.scala index 34c9e08aa18..f59157f1bce 100644 --- a/main/util/src/mill/util/CoursierSupport.scala +++ b/main/util/src/mill/util/CoursierSupport.scala @@ -114,7 +114,6 @@ trait CoursierSupport { customizer: Option[Resolution => Resolution] = None, ctx: Option[mill.api.Ctx.Log] = None, coursierCacheCustomizer: Option[FileCache[Task] => FileCache[Task]] = None, - resolveFilter: os.Path => Boolean = _ => true, artifactTypes: Option[Set[Type]] = None, resolutionParams: ResolutionParams = ResolutionParams() ): Result[Agg[PathRef]] = { @@ -157,7 +156,6 @@ trait CoursierSupport { Agg.from( res.files .map(os.Path(_)) - .filter(resolveFilter) .map(PathRef(_, quick = true)) ) ) @@ -175,7 +173,6 @@ trait CoursierSupport { customizer: Option[Resolution => Resolution], ctx: Option[mill.api.Ctx.Log], coursierCacheCustomizer: Option[FileCache[Task] => FileCache[Task]], - resolveFilter: os.Path => Boolean, artifactTypes: Option[Set[Type]] ): Result[Agg[PathRef]] = resolveDependencies( @@ -187,7 +184,6 @@ trait CoursierSupport { customizer, ctx, coursierCacheCustomizer, - resolveFilter, artifactTypes, ResolutionParams() ) @@ -201,8 +197,7 @@ trait CoursierSupport { mapDependencies: Option[Dependency => Dependency], customizer: Option[Resolution => Resolution], ctx: Option[mill.api.Ctx.Log], - coursierCacheCustomizer: Option[FileCache[Task] => FileCache[Task]], - resolveFilter: os.Path => Boolean + coursierCacheCustomizer: Option[FileCache[Task] => FileCache[Task]] ): Result[Agg[PathRef]] = resolveDependencies( repositories, @@ -213,7 +208,6 @@ trait CoursierSupport { customizer, ctx, coursierCacheCustomizer, - resolveFilter, None ) diff --git a/main/util/src/mill/util/Util.scala b/main/util/src/mill/util/Util.scala index 9b7cdc60e7d..4e7ba1be198 100644 --- a/main/util/src/mill/util/Util.scala +++ b/main/util/src/mill/util/Util.scala @@ -73,7 +73,6 @@ object Util { def millProjectModule( artifact: String, repositories: Seq[Repository], - resolveFilter: os.Path => Boolean = _ => true, // this should correspond to the mill runtime Scala version artifactSuffix: String = "_2.13" ): Result[Agg[PathRef]] = { @@ -89,8 +88,7 @@ object Util { BuildInfo.millVersion ) ), - force = Nil, - resolveFilter = resolveFilter + force = Nil ).map(_.map(_.withRevalidateOnce)) } diff --git a/scalajslib/package.mill b/scalajslib/package.mill index 80bc08913dd..c4c466a6708 100644 --- a/scalajslib/package.mill +++ b/scalajslib/package.mill @@ -46,8 +46,9 @@ object `package` extends RootModule with build.MillStableScalaModule with BuildI def scalajsWorkerVersion = crossValue def millSourcePath: os.Path = super.millSourcePath / scalajsWorkerVersion def testDepPaths = Task { Seq(compile().classes) } - def moduleDeps = Seq(build.scalajslib.`worker-api`, build.main.client, build.main.api) - def ivyDeps = Agg( + def compileModuleDeps = Seq(build.scalajslib.`worker-api`, build.main.client, build.main.api) + def mandatoryIvyDeps = Agg.empty[Dep] + def compileIvyDeps = super.mandatoryIvyDeps() ++ Agg( build.Deps.Scalajs_1.scalajsLinker, build.Deps.Scalajs_1.scalajsSbtTestAdapter, build.Deps.Scalajs_1.scalajsEnvNodejs, diff --git a/scalanativelib/package.mill b/scalanativelib/package.mill index 0233b4a6c65..450fe0e413a 100644 --- a/scalanativelib/package.mill +++ b/scalanativelib/package.mill @@ -19,10 +19,10 @@ object `package` extends RootModule with build.MillStableScalaModule { def scalaNativeWorkerVersion = crossValue def millSourcePath: os.Path = super.millSourcePath / scalaNativeWorkerVersion def testDepPaths = Task { Seq(compile().classes) } - def moduleDeps = Seq(`worker-api`) - def ivyDeps = scalaNativeWorkerVersion match { + def compileModuleDeps = Seq(`worker-api`) + def compileIvyDeps = scalaNativeWorkerVersion match { case "0.5" => - Agg( + super.mandatoryIvyDeps() ++ Agg( build.Deps.osLib, build.Deps.Scalanative_0_5.scalanativeTools, build.Deps.Scalanative_0_5.scalanativeUtil, @@ -30,5 +30,6 @@ object `package` extends RootModule with build.MillStableScalaModule { build.Deps.Scalanative_0_5.scalanativeTestRunner ) } + def mandatoryIvyDeps = Agg.empty[mill.scalalib.Dep] } }