From 1cc90c1d541e4748dc3829a05910a86d5f7796ad Mon Sep 17 00:00:00 2001 From: Tobias Roeser Date: Sat, 18 Nov 2023 13:33:43 +0100 Subject: [PATCH] Reuse upstream transitiveModuleDpes --- build.sc | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/build.sc b/build.sc index 4a52a95..9df587f 100644 --- a/build.sc +++ b/build.sc @@ -29,19 +29,8 @@ trait Cli extends ScalaModule with ScalaJsCliPublishModule { ) def mainClass = Some("org.scalajs.cli.Scalajsld") - def transitiveJars: T[Agg[PathRef]] = { - - def allModuleDeps(todo: List[JavaModule]): List[JavaModule] = { - todo match { - case Nil => Nil - case h :: t => - h :: allModuleDeps(h.moduleDeps.toList ::: t) - } - } - - T { - mill.define.Target.traverse(allModuleDeps(this :: Nil).distinct)(m => T.task(m.jar()))() - } + def transitiveJars: T[Seq[PathRef]] = T { + T.traverse(transitiveModuleDeps)(_.jar)() } def jarClassPath = T { @@ -112,7 +101,7 @@ trait ScalaJsCliNativeImage extends ScalaModule with NativeImage { def graalVmVersion = "22.3.3" def nativeImageGraalVmJvmId = s"graalvm-java17:$graalVmVersion" def nativeImageName = "scala-js-ld" - def moduleDeps() = Seq( + def moduleDeps = Seq( cli ) def compileIvyDeps = super.compileIvyDeps() ++ Seq(