-
Notifications
You must be signed in to change notification settings - Fork 9
/
build.gradle.kts
58 lines (57 loc) · 2.01 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "1.8.0" apply false
id("org.jmailen.kotlinter") version "3.13.0" apply false
id("com.github.ben-manes.versions") version "0.44.0"
id("io.gitlab.arturbosch.detekt") version "1.22.0"
id("com.google.devtools.ksp") version "1.8.0-1.0.8" apply false
}
allprojects {
repositories {
mavenLocal()
mavenCentral()
maven("https://jitpack.io")
maven("https://maven.google.com/")
maven("https://maven.codeawakening.com")
}
}
subprojects {
group = "com.github.cs125-illinois.jeed"
version = "2023.1.0"
tasks.withType<Test> {
useJUnitPlatform()
enableAssertions = true
jvmArgs(
"-ea", "--enable-preview", "-Dfile.encoding=UTF-8",
"-Xms512m", "-Xmx1G", "-Xss256k",
"-XX:+UseZGC", "-XX:ZCollectionInterval=8",
"-XX:-OmitStackTraceInFastThrow",
"--add-opens", "java.base/java.lang=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"
)
}
tasks.withType<KotlinCompile> {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.toString()
}
}
}
tasks.dependencyUpdates {
fun String.isNonStable() = !(
listOf("RELEASE", "FINAL", "GA").any { toUpperCase().contains(it) }
|| "^[0-9,.v-]+(-r)?$".toRegex().matches(this)
)
rejectVersionIf { candidate.version.isNonStable() }
gradleReleaseChannel = "current"
}
detekt {
buildUponDefaultConfig = true
}
tasks.register("check") {
dependsOn("detekt")
}