Skip to content

Commit

Permalink
Reuse upstream transitiveModuleDpes
Browse files Browse the repository at this point in the history
  • Loading branch information
lefou committed Nov 18, 2023
1 parent df34422 commit 1cc90c1
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 1cc90c1

Please sign in to comment.