-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.mill
69 lines (51 loc) · 1.54 KB
/
build.mill
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
package build
import mill._, mill.scalalib._
import mill.define.ModuleRef
import $ivy.`com.lihaoyi::mill-contrib-jmh:`
import contrib.jmh.JmhModule
object ZinkWorkerGraalvm extends ZincWorkerModule {
def jvmId = "graalvm-community:23.0.2"
}
//noinspection DuplicatedCode
trait Java21PreviewFeatures extends JavaModule with NativeImageModule {
override def javacOptions: T[Seq[String]] = Task {
Seq("--enable-preview", "--release", "23")
}
override def forkArgs: T[Seq[String]] = Task {
Seq("--enable-preview")
}
def zincWorker = ModuleRef(ZinkWorkerGraalvm)
def nativeImageOptions = Seq(
"--enable-preview",
"--no-fallback",
)
}
object helper extends Java21PreviewFeatures
trait AocModule extends Java21PreviewFeatures {
def moduleDeps: Seq[JavaModule] = Seq(helper)
}
object day01 extends AocModule {
def mainClass: T[Option[String]] = Some("Day01")
}
object day02 extends AocModule {
def mainClass: T[Option[String]] = Some("Day02")
}
object day03 extends AocModule {
def mainClass: T[Option[String]] = Some("Day03")
}
object day04 extends AocModule {
def mainClass: T[Option[String]] = Some("Day04")
}
object day05 extends AocModule {
def mainClass: T[Option[String]] = Some("Day05")
}
object day06 extends AocModule {
def mainClass: T[Option[String]] = Some("Day06")
}
object day07 extends AocModule with JmhModule {
def mainClass: T[Option[String]] = Some("Day07")
override def jmhCoreVersion: T[String] = "1.37"
}
object day08 extends AocModule {
def mainClass: T[Option[String]] = Some("Day08")
}