-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
40 lines (32 loc) · 1009 Bytes
/
build.gradle.kts
File metadata and controls
40 lines (32 loc) · 1009 Bytes
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
plugins {
id("java")
}
// ── Shared configuration applied to every subproject ─────────────────────────
subprojects {
apply(plugin = "java-library")
group = "io.validy"
version = "1.0.0"
repositories {
mavenCentral()
}
// Shared compiler settings
extensions.configure<JavaPluginExtension> {
toolchain {
languageVersion = JavaLanguageVersion.of(24)
}
}
tasks.withType<JavaCompile>().configureEach {
options.compilerArgs.addAll(listOf(
"--enable-preview", // needed for sealed types + pattern matching in Java 21+
"-Xlint:all",
"-Xlint:-processing" // suppress annotation processor warnings
))
}
tasks.withType<Test>().configureEach {
useJUnitPlatform()
jvmArgs("--enable-preview")
}
tasks.withType<JavaExec>().configureEach {
jvmArgs("--enable-preview")
}
}