-
Notifications
You must be signed in to change notification settings - Fork 396
/
build.gradle.kts
97 lines (83 loc) · 2.6 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
plugins {
kotlin("jvm") version "2.0.21"
groovy
`java-gradle-plugin`
id("shadow.convention.publish")
id("shadow.convention.deploy")
id("com.diffplug.spotless") version "7.0.0.BETA4"
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlin {
compilerOptions {
// https://docs.gradle.org/current/userguide/compatibility.html#kotlin
apiVersion = KotlinVersion.KOTLIN_1_8
jvmTarget = JvmTarget.JVM_1_8
freeCompilerArgs.addAll(
"-Xjvm-default=all",
)
}
}
spotless {
kotlinGradle {
ktlint()
target("**/*.kts")
targetExclude("build-logic/build/**")
}
}
dependencies {
compileOnly(localGroovy())
implementation(projects.api)
implementation("org.jdom:jdom2:2.0.6.1")
implementation("org.ow2.asm:asm-commons:9.7.1")
implementation("commons-io:commons-io:2.18.0")
implementation("org.apache.ant:ant:1.10.15")
implementation("org.codehaus.plexus:plexus-utils:4.0.2")
implementation("org.codehaus.plexus:plexus-xml:4.0.4")
implementation("org.apache.logging.log4j:log4j-core:2.24.1")
implementation("org.vafer:jdependency:2.11")
testImplementation("org.spockframework:spock-core:2.3-groovy-3.0") {
exclude(group = "org.codehaus.groovy")
exclude(group = "org.hamcrest")
}
testImplementation("org.xmlunit:xmlunit-legacy:2.10.0")
testImplementation("org.apache.commons:commons-lang3:3.17.0")
testImplementation("com.google.guava:guava:33.3.1-jre")
testImplementation(platform("org.junit:junit-bom:5.11.3"))
testImplementation("org.junit.jupiter:junit-jupiter")
testImplementation("org.junit.platform:junit-platform-suite-engine")
}
val isCI = providers.environmentVariable("CI").isPresent
tasks.withType<Test>().configureEach {
useJUnitPlatform()
maxParallelForks = Runtime.getRuntime().availableProcessors()
if (isCI) {
testLogging.showStandardStreams = true
minHeapSize = "1g"
maxHeapSize = "1g"
}
systemProperty("shadowVersion", version)
// Required to test configuration cache in tests when using withDebug()
// https://github.com/gradle/gradle/issues/22765#issuecomment-1339427241
jvmArgs(
"--add-opens",
"java.base/java.util=ALL-UNNAMED",
"--add-opens",
"java.base/java.util.concurrent.atomic=ALL-UNNAMED",
"--add-opens",
"java.base/java.lang.invoke=ALL-UNNAMED",
"--add-opens",
"java.base/java.net=ALL-UNNAMED",
)
}
tasks.register("release") {
dependsOn(
tasks.publish,
tasks.publishPlugins,
tasks.gitPublishPush,
)
}