-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
64 lines (63 loc) · 2.36 KB
/
build.gradle.kts
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
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "2.0.21" apply false
id("org.jmailen.kotlinter") version "4.4.1" apply false
id("com.github.ben-manes.versions") version "0.51.0"
id("com.google.devtools.ksp").version("2.0.21-1.0.26") apply false
id("io.github.gradle-nexus.publish-plugin") version "2.0.0"
}
allprojects {
group = "org.cs124.questioner"
version = "2024.11.0"
}
subprojects {
tasks.withType<KotlinCompile> {
compilerOptions {
jvmTarget = JvmTarget.JVM_21
}
}
tasks.withType<Sign> {
onlyIf {
gradle.taskGraph.allTasks.any { it is PublishToMavenRepository }
}
isRequired = gradle.taskGraph.allTasks.any { it is PublishToMavenRepository }
}
tasks.withType<Test> {
useJUnitPlatform()
environment["JEED_USE_CACHE"] = "true"
jvmArgs(
"-ea", "--enable-preview", "-Dfile.encoding=UTF-8", "-Djava.security.manager=allow",
"-XX:+UseZGC", "-XX:ZCollectionInterval=8", "-XX:-OmitStackTraceInFastThrow",
"--add-opens", "java.base/java.lang=ALL-UNNAMED",
"--add-opens", "java.base/java.util=ALL-UNNAMED",
"--add-exports", "jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED",
"--add-exports", "jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED",
"--add-exports", "jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED",
"--add-exports", "jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED",
"--add-exports", "jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED",
"--add-exports", "java.management/sun.management=ALL-UNNAMED"
)
}
}
allprojects {
tasks.withType<Test> {
enableAssertions = true
}
}
tasks.dependencyUpdates {
fun String.isNonStable() = !(
listOf("RELEASE", "FINAL", "GA").any { uppercase().contains(it) }
|| "^[0-9,.v-]+(-r)?$".toRegex().matches(this)
)
rejectVersionIf { candidate.version.isNonStable() }
gradleReleaseChannel = "current"
}
nexusPublishing {
repositories {
sonatype {
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
}
}
}