Skip to content

Commit

Permalink
Use the same mechanism to disable tasks on Java 11 throughout the build.
Browse files Browse the repository at this point in the history
  • Loading branch information
nedtwigg committed May 3, 2020
1 parent 7ebb481 commit 0104f6d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions gradle/java-publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ task sourcesJar(type: Jar) {
// Thus, no javadoc warnings.
javadoc {
options.addStringOption('Xdoclint:none', '-quiet')
// disable javadoc on 11
if (org.gradle.api.JavaVersion.current().compareTo(org.gradle.api.JavaVersion.VERSION_1_9) >= 0) {
enabled = false
}
enabled = org.gradle.api.JavaVersion.current() == org.gradle.api.JavaVersion.VERSION_1_8
}

// use markdown in javadoc
Expand Down
2 changes: 1 addition & 1 deletion gradle/java-setup.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ spotbugs {
// HTML instead of XML
tasks.withType(spotBugsTaskType()) {
// only run on Java 8 (no benefit to running twice)
enabled = System.getProperty("java.version").startsWith('1.8.')
enabled = org.gradle.api.JavaVersion.current() == org.gradle.api.JavaVersion.VERSION_1_8
reports {
xml.enabled = false
html.enabled = true
Expand Down

0 comments on commit 0104f6d

Please sign in to comment.