diff --git a/.travis.yml b/.travis.yml index 9a385444d2..d29b5ef4a8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/build.gradle b/build.gradle index 5a01e6e1a9..46b8c2ca28 100644 --- a/build.gradle +++ b/build.gradle @@ -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"