-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
97 lines (82 loc) · 2.6 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
plugins {
id 'com.diffplug.spotless' version '6.25.0' apply false
id 'info.solidsoft.pitest' version '1.15.0' apply false
id 'io.github.gradle-nexus.publish-plugin' version '2.0.0'
id 'me.champeau.jmh' version '0.7.2' apply false
id 'net.ltgt.errorprone' version '4.1.0' apply false
id 'net.researchgate.release' version '3.0.2'
id 'org.beryx.jar' version '2.0.0' apply false
}
subprojects {
apply plugin: 'java-library'
apply plugin: 'org.beryx.jar'
apply from: rootProject.file('gradle/check-checkstyle.gradle')
apply from: rootProject.file('gradle/check-codecoverage.gradle')
apply from: rootProject.file('gradle/check-errorprone.gradle')
apply from: rootProject.file('gradle/publish-jar.gradle')
apply from: rootProject.file('gradle/publish-maven.gradle')
repositories {
mavenCentral()
}
configurations {
[compileClasspath, runtimeClasspath]*.resolutionStrategy*.activateDependencyLocking()
}
java {
withJavadocJar()
withSourcesJar()
sourceCompatibility = JavaVersion.VERSION_1_6
targetCompatibility = JavaVersion.VERSION_1_6
}
compileJava {
options.release = 6
options.compilerArgs << '-Xlint:all,-options' << '-Werror'
}
compileTestJava {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
options.release = 11
}
moduleConfig {
moduleInfoPath = 'src/main/module/module-info.java'
multiReleaseVersion = 11
version = project.version
neverCompileModuleInfo = true
}
test {
useJUnitPlatform()
reports {
html.required = project.hasProperty('reports')
junitXml.required = true
}
}
javadoc {
options.memberLevel = JavadocMemberLevel.PROTECTED
options.addBooleanOption('html5', true)
}
tasks.register('resolveAndLock') {
notCompatibleWithConfigurationCache('Fitlers configurations at execution time')
doFirst {
assert gradle.startParameter.writeDependencyLocks : "$path must be run from the the command line with the `--write-locks` flag"
}
doLast {
[configurations.compileClasspath, configurations.runtimeClasspath].each { it.resolve() }
}
}
}
nexusPublishing {
repositories {
sonatype {
username = sonatypeUsername
password = sonatypePassword
}
}
}
release {
preCommitText = '[skip ci]'
git {
requireBranch.set('2.x')
}
}
wrapper {
gradleVersion = '8.11'
}