1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-22 20:12:07 +01:00

[build-logic] Remove some isJavaXCompatible blocks

Since Smack requires now Java 11, all conditional code for lower Java
versions can be dropped from the build logic.
This commit is contained in:
Florian Schmaus 2024-10-15 13:27:56 +02:00
parent d3de2d65b9
commit 8b9cd98756
2 changed files with 13 additions and 40 deletions

View file

@ -89,28 +89,7 @@ tasks.withType(JavaCompile) {
'-Xlint:-serial', '-Xlint:-serial',
'-Werror', '-Werror',
] ]
} options.release = Integer.valueOf(javaMajor)
if (JavaVersion.current().isJava8Compatible()) {
tasks.withType(Javadoc) {
// The '-quiet' as second argument is actually a hack,
// since the one parameter addStringOption doesn't seem to
// work, we extra add '-quiet', which is added anyway by
// gradle.
// We disable 'missing' as we do most of javadoc checking via checkstyle.
options.addStringOption('Xdoclint:all,-missing', '-quiet')
// Abort on javadoc warnings.
// See JDK-8200363 (https://bugs.openjdk.java.net/browse/JDK-8200363)
// for information about the -Xwerror option.
options.addStringOption('Xwerror', '-quiet')
}
}
if (JavaVersion.current().isJava9Compatible()) {
tasks.withType(JavaCompile) {
options.compilerArgs.addAll([
'--release', javaMajor,
])
}
} }
jacoco { jacoco {

View file

@ -4,25 +4,19 @@ plugins {
id 'org.igniterealtime.smack.global-conventions' id 'org.igniterealtime.smack.global-conventions'
} }
if (JavaVersion.current().isJava8Compatible()) {
tasks.withType(Javadoc) {
// The '-quiet' as second argument is actually a hack,
// since the one parameter addStringOption doesn't seem to
// work, we extra add '-quiet', which is added anyway by
// gradle.
// We disable 'missing' as we do most of javadoc checking via checkstyle.
options.addStringOption('Xdoclint:all,-missing', '-quiet')
// Abort on javadoc warnings.
// See JDK-8200363 (https://bugs.openjdk.java.net/browse/JDK-8200363)
// for information about the -Xwerror option.
options.addStringOption('Xwerror', '-quiet')
}
}
if (JavaVersion.current().isJava9Compatible()) { tasks.withType(Javadoc) {
tasks.withType(Javadoc) { // The '-quiet' as second argument is actually a hack,
options.addStringOption('-release', javaMajor) // since the one parameter addStringOption doesn't seem to
} // work, we extra add '-quiet', which is added anyway by
// gradle.
// We disable 'missing' as we do most of javadoc checking via checkstyle.
options.addStringOption('Xdoclint:all,-missing', '-quiet')
// Abort on javadoc warnings.
// See JDK-8200363 (https://bugs.openjdk.java.net/browse/JDK-8200363)
// for information about the -Xwerror option.
options.addStringOption('Xwerror', '-quiet')
options.addStringOption('-release', javaMajor)
} }
tasks.withType(Javadoc) { tasks.withType(Javadoc) {