Fix jdk10 support in travis (#4653)

For jdk10: disable errorprone and fix javadoc warnings
This commit is contained in:
zpencer 2018-07-19 13:35:27 -07:00 committed by GitHub
parent 499f95d3ec
commit 37e6f5f775
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 3 deletions

View File

@ -40,8 +40,15 @@ os:
- linux
jdk:
- oraclejdk8
- oraclejdk9
# net.ltgt.errorprone supports jdk8 and jdk9, but has problems with jdk10
# For jdk10, we need to switch over to using net.ltgt.errorprone-javacplugin,
# and likely update to the latest com.google.errorprone:error_prone_core.
# We have decided not to make our build.gradle support both plugins, so when
# we finally move off of jdk8 and jdk9 we will need use the javac annotation
# processor based plugin.
- oraclejdk8 # if both jdk 8 and 9 are removed, migrate to net.ltgt.errorprone-javacplugin (see above comment)
- oraclejdk9 # if both jdk 8 and 9 are removed, migrate to net.ltgt.errorprone-javacplugin (see above comment)
- oraclejdk10
notifications:
email: false

View File

@ -26,7 +26,9 @@ subprojects {
apply plugin: "com.google.osdetector"
// The plugin only has an effect if a signature is specified
apply plugin: "ru.vyarus.animalsniffer"
if (!rootProject.hasProperty('errorProne') || rootProject.errorProne.toBoolean()) {
// jdk10 not supported by errorprone: https://github.com/google/error-prone/issues/860
if (!JavaVersion.current().isJava10Compatible() &&
rootProject.properties.get('errorProne', true)) {
apply plugin: "net.ltgt.errorprone"
apply plugin: "net.ltgt.apt"
@ -281,6 +283,15 @@ subprojects {
}
}
// For jdk10 we must explicitly choose between html4 and html5, otherwise we get a warning
if (JavaVersion.current().isJava10Compatible()) {
allprojects {
tasks.withType(Javadoc) {
options.addBooleanOption('html4', true)
}
}
}
checkstyle {
configFile = file("$rootDir/buildscripts/checkstyle.xml")
toolVersion = "6.17"