forked from graalvm/graal-js-jdk11-maven-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sc
97 lines (84 loc) · 3.29 KB
/
build.sc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
// build.sc
import mill._, scalalib._
trait JUnitTests extends TestModule {
def testFrameworks = Seq("com.novocode.junit.JUnitFramework")
def ivyDeps = Agg(ivy"com.novocode:junit-interface:0.11")
}
trait uTests extends TestModule {
def ivyDeps = Agg(ivy"com.lihaoyi::utest::0.6.3")
def testFrameworks = Seq("utest.runner.Framework")
}
object graaljs extends JavaModule {
lazy val graalvmVersion = "19.2.0.1"
lazy val junitVersion = "4.12"
override def ivyDeps = Agg(
ivy"org.graalvm.sdk:graal-sdk:$graalvmVersion",
ivy"org.graalvm.js:js:$graalvmVersion",
ivy"org.graalvm.js:js-scriptengine:$graalvmVersion",
ivy"org.graalvm.tools:profiler:$graalvmVersion",
ivy"org.graalvm.tools:chromeinspector:$graalvmVersion"
)
lazy val graalArgs = T {
//val tmp = "/home/hmf/IdeaProjects/graal-js-jdk11-maven-demo/target/compiler"
val tmp = "/home/hmf/IdeaProjects/graal-js-jdk11-maven-demo/target/compiler/compiler.jar:/home/hmf/IdeaProjects/graal-js-jdk11-maven-demo/target/compiler/graal-sdk.jar:/home/hmf/IdeaProjects/graal-js-jdk11-maven-demo/target/compiler/truffle-api.jar"
Seq(
"-XX:+UnlockExperimentalVMOptions",
"-XX:+EnableJVMCI",
s"--module-path=$tmp",
s"--upgrade-module-path=/home/hmf/IdeaProjects/graal-js-jdk11-maven-demo/target/compiler/compiler.jar"
)
}
override def forkArgs = graalArgs
/*
object test extends Tests with uTests {
// Seems we don't need JUnit deps
override def ivyDeps = super.ivyDeps() ++
Agg(
ivy"org.graalvm.sdk:graal-sdk:$graalvmVersion",
ivy"org.graalvm.js:js:$graalvmVersion",
ivy"org.graalvm.js:js-scriptengine:$graalvmVersion",
ivy"org.graalvm.tools:profiler:$graalvmVersion",
ivy"org.graalvm.tools:chromeinspector:$graalvmVersion"
)
override def forkArgs = graalArgs
}*/
// mill -i inspect graaljs.test.ivyDeps
// mill -i show graaljs.test.ivyDeps
// mill -i resolve graaljs.test._
// mill -i show graaljs.test.upstreamAssemblyClasspath
// mill -i show graaljs.test.runClasspath
// mill -i show graaljs.test.compileClasspath
// mill -i show graaljs.test.localClasspath
// mill -i show graaljs.test.transitiveLocalClasspath
object test extends Tests with JUnitTests {
/*
// Seems we don't need JUnit deps
override def ivyDeps = super.ivyDeps() ++ Agg(ivy"junit:junit:${junitVersion}") ++
Agg(
ivy"org.graalvm.sdk:graal-sdk:$graalvmVersion",
ivy"org.graalvm.js:js:$graalvmVersion",
ivy"org.graalvm.js:js-scriptengine:$graalvmVersion",
ivy"org.graalvm.tools:profiler:$graalvmVersion",
ivy"org.graalvm.tools:chromeinspector:$graalvmVersion"
)
*/
override def forkArgs = graalArgs
}
/*
object test extends Tests {
def testFrameworks = Seq("com.novocode.junit.JUnitFramework")
// Seems we don't need JUnit deps
override def ivyDeps =
Agg(
ivy"com.novocode:junit-interface:0.11",
ivy"junit:junit:${junitVersion}",
ivy"org.graalvm.sdk:graal-sdk:$graalvmVersion",
ivy"org.graalvm.js:js:$graalvmVersion",
ivy"org.graalvm.js:js-scriptengine:$graalvmVersion",
ivy"org.graalvm.tools:profiler:$graalvmVersion",
ivy"org.graalvm.tools:chromeinspector:$graalvmVersion"
)
override def forkArgs = graalArgs
}
*/
}