forked from com-lihaoyi/cask
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.mill
More file actions
44 lines (34 loc) · 1.15 KB
/
package.mill
File metadata and controls
44 lines (34 loc) · 1.15 KB
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
package build.example.todoDbWithLoom
import mill._, scalalib._
import mill.api.ModuleRef
object app extends Cross[AppModule](build.scala3Latest)
trait AppModule extends CrossScalaModule{
private def parseJvmArgs(argsStr: String) = {
argsStr.split(" ").filter(_.nonEmpty).toSeq
}
def forkArgs = Task.Input {
//TODO not sure why the env passing is not working
val envVirtualThread: String = Task.env.getOrElse("CASK_VIRTUAL_THREAD", "false")
println("envVirtualThread: " + envVirtualThread)
val systemProps = Seq(s"-Dcask.virtual-threads.enabled=$envVirtualThread")
val baseArgs = Seq(
"--add-opens", "java.base/java.lang=ALL-UNNAMED"
)
val seq = baseArgs ++ systemProps
println("final forkArgs: " + seq)
seq
}
def jvmId = "temurin:23.0.1"
def jvmIndexVersion = "latest.release"
def moduleDeps = Seq(build.cask(build.scala3))
def mvnDeps = Seq[Dep](
mvn"org.xerial:sqlite-jdbc:3.42.0.0",
mvn"com.lihaoyi::scalasql:0.2.2",
)
object test extends ScalaTests with TestModule.Utest {
def mvnDeps = Seq(
mvn"com.lihaoyi::utest::0.8.4",
mvn"com.lihaoyi::requests::0.9.0",
)
}
}