@@ -7,14 +7,22 @@ import io.github.alexarchambault.millnativeimage.NativeImage
7
7
import io .github .alexarchambault .millnativeimage .upload .Upload
8
8
import mill ._
9
9
import mill .scalalib ._
10
+ import coursier .core .Version
10
11
11
- def scalaJsCliVersion = " 1.1.1-sc3 "
12
+ def scalaJsCliVersion = " 1.1.1-sc4.1 "
12
13
def scalaJsVersions = Seq (" 1.9.0" , " 1.10.0" )
13
14
14
15
class ScalaJsCliNativeImage (val scalaJsVersion0 : String ) extends ScalaModule with NativeImage {
15
16
def scalaVersion = " 2.13.8"
16
17
def scalaJsVersion = scalaJsVersion0
17
18
19
+ def sources = T .sources {
20
+ val extra =
21
+ if (Version (scalaJsVersion) < Version (" 1.10" )) Nil
22
+ else Seq (PathRef (os.pwd / " scala-js-1.10+" / " src" ))
23
+ super .sources() ++ extra
24
+ }
25
+
18
26
def nativeImageClassPath = T {
19
27
runClasspath()
20
28
}
@@ -27,12 +35,18 @@ class ScalaJsCliNativeImage(val scalaJsVersion0: String) extends ScalaModule wit
27
35
)
28
36
}
29
37
def nativeImagePersist = System .getenv(" CI" ) != null
30
- def nativeImageGraalVmJvmId = " graalvm-java17:22.0.0"
38
+ def graalVmVersion = " 22.0.0"
39
+ def nativeImageGraalVmJvmId = s " graalvm-java17: $graalVmVersion"
31
40
def nativeImageName = " scala-js-ld"
32
41
def ivyDeps = super .ivyDeps() ++ Seq (
33
- ivy " io.github.alexarchambault.tmp::scalajs-cli: $scalaJsCliVersion" ,
42
+ ivy " io.github.alexarchambault.tmp::scalajs-cli: $scalaJsCliVersion"
43
+ // so that this doesn't bump the version we pull ourselves
44
+ .exclude((" org.scala-js" , " scalajs-linker_2.13" )),
34
45
ivy " org.scala-js::scalajs-linker: $scalaJsVersion"
35
46
)
47
+ def compileIvyDeps = super .compileIvyDeps() ++ Seq (
48
+ ivy " org.graalvm.nativeimage:svm: $graalVmVersion"
49
+ )
36
50
def nativeImageMainClass = " org.scalajs.cli.Scalajsld"
37
51
38
52
def nameSuffix = " "
0 commit comments