-
Notifications
You must be signed in to change notification settings - Fork 18
/
build.gradle
39 lines (32 loc) · 932 Bytes
/
build.gradle
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
plugins {
id 'java'
}
repositories {
mavenCentral()
}
dependencies {
testImplementation("org.junit.jupiter:junit-jupiter-api:5.6.2")
testImplementation("org.junit.jupiter:junit-jupiter-params:5.6.2")
testImplementation("org.junit.jupiter:junit-jupiter-engine:5.6.2")
testImplementation("com.approvaltests:approvaltests:9.3.0")
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
options.compilerArgs.add("-Xlint:all")
options.incremental = true
if (jdkWithPreviewFeatures())
options.compilerArgs.add("--enable-preview")
}
test {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
}
if (jdkWithPreviewFeatures())
jvmArgs("--enable-preview")
}
static def jdkWithPreviewFeatures() {
def currentJvm = org.gradle.internal.jvm.Jvm.current()
def matcher = currentJvm =~ /^\d+/
return matcher[0].toInteger() > 11
}