-
Notifications
You must be signed in to change notification settings - Fork 25
/
build.gradle
82 lines (71 loc) · 2.32 KB
/
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
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
plugins {
id 'org.nosphere.gradle.github.actions' version '1.4.0'
id 'maven-publish'
id 'groovy'
}
group = 'nu.studer'
version = '1.0.5-DEV'
repositories {
mavenCentral()
}
dependencies {
testImplementation('org.spockframework:spock-core:2.3-groovy-3.0')
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(8)
vendor = JvmVendorSpec.BELLSOFT
}
withJavadocJar()
withSourcesJar()
}
tasks.withType(AbstractCompile).configureEach {
options.compilerArgs <<
"-Werror" <<
"-Xlint:all" <<
"-Xlint:-serial"
}
tasks.withType(Test).configureEach {
maxParallelForks = 1 // there is currently only a single test class
useJUnitPlatform()
String testJavaRuntimeVersion = findProperty('testJavaRuntimeVersion') ?: '8'
javaLauncher.set(javaToolchains.launcherFor { spec ->
spec.languageVersion.set(JavaLanguageVersion.of(testJavaRuntimeVersion))
buildScan.value(identityPath.path + "#jvmVersion", testJavaRuntimeVersion)
} as Provider<? extends JavaLauncher>)
if (testJavaRuntimeVersion.toInteger() >= 16) { // required due to tightened reflective access in JDK 16 and higher
jvmArgs '--add-opens', 'java.base/java.util=ALL-UNNAMED'
}
}
javadoc {
options.addStringOption('Xdoclint:none', '-quiet')
}
publishing {
publications {
java(MavenPublication) {
from components.java
pom {
name = 'java-ordered-properties'
description = 'Alternative to the JDK class java.util.Properties'
url = 'https://github.com/etiennestuder/java-ordered-properties'
licenses {
license {
name = 'Apache License, Version 2.0'
url = 'https://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'etiennestuder'
name = 'Etienne Studer'
email = '[email protected]'
}
}
scm {
url = 'https://github.com/etiennestuder/java-ordered-properties.git'
}
}
}
}
}