1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-22 12:02:05 +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',
'-Werror',
]
}
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,
])
}
options.release = Integer.valueOf(javaMajor)
}
jacoco {

View file

@ -4,7 +4,7 @@ plugins {
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
@ -16,14 +16,8 @@ if (JavaVersion.current().isJava8Compatible()) {
// 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) {
options.addStringOption('-release', javaMajor)
}
}
tasks.withType(Javadoc) {
options.charSet = "UTF-8"