-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathopenlayer.java.gradle.kts
57 lines (47 loc) · 1.01 KB
/
openlayer.java.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
import com.diffplug.gradle.spotless.SpotlessExtension
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import java.util.Locale
plugins {
`java-library`
id("com.diffplug.spotless")
}
repositories {
mavenCentral()
}
configure<JavaPluginExtension> {
withJavadocJar()
withSourcesJar()
}
configure<SpotlessExtension> {
java {
importOrder()
removeUnusedImports()
palantirJavaFormat()
}
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}
tasks.withType<JavaCompile>().configureEach {
options.compilerArgs.add("-Werror")
options.release.set(8)
}
tasks.named<Jar>("javadocJar") {
setZip64(true)
}
tasks.named<Jar>("jar") {
manifest {
attributes(mapOf(
"Implementation-Title" to project.name,
"Implementation-Version" to project.version
))
}
}
tasks.named<Test>("test") {
useJUnitPlatform()
testLogging {
exceptionFormat = TestExceptionFormat.FULL
}
}