From 5352f09e7e6675741ceced470883297fa2424918 Mon Sep 17 00:00:00 2001 From: Danno Ferrin Date: Thu, 18 Oct 2018 08:50:50 -0600 Subject: [PATCH] [MINOR] Only Test errorprone-checks on JDK8 (#89) * [MINOR] Only Test errorprone-checks on JDK8 The current version of errorprone causes errors when compiled with Java 11. The next version causes causes problems with Java 8. So for now keep the old version and only test when compiled with Java 8 (which is the current Jenkins version). When the test is skipped an info log is sent. --- errorprone-checks/build.gradle | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/errorprone-checks/build.gradle b/errorprone-checks/build.gradle index e1e46a588a..448811ac70 100644 --- a/errorprone-checks/build.gradle +++ b/errorprone-checks/build.gradle @@ -19,7 +19,7 @@ dependencies { implementation "com.google.errorprone:error_prone_core" implementation "com.google.errorprone:error_prone_annotation" - implementation "com.google.auto.service:auto-service:1.0-rc4" + implementation "com.google.auto.service:auto-service:1.0-rc4" annotationProcessor "com.google.auto.service:auto-service:1.0-rc4" testImplementation "junit:junit" @@ -30,8 +30,13 @@ dependencies { } test { - if (JavaVersion.current().isJava8()) { - jvmArgs "-Xbootclasspath/p:${configurations.epJavac.asPath}" + if (!JavaVersion.current().isJava8()) { + enabled = false + logger.info("Disabling {} because errorprone tests always fail in Java {}", + project.name, JavaVersion.current().majorVersion) } + + jvmArgs "-Xbootclasspath/p:${configurations.epJavac.asPath}" + testLogging { showStandardStreams = true } }