Always include errorprone dependency, even if we're not checking. This ensures consistent use patterns across JVMs.

This commit is contained in:
Dawid Weiss 2021-03-11 22:27:25 +01:00
parent e784721e69
commit 8bbcc39583
1 changed files with 125 additions and 123 deletions

View File

@ -15,10 +15,9 @@
* limitations under the License.
*/
// LUCENE-9650: Errorprone on master/gradle no longer works with JDK-16
if (rootProject.runtimeJavaVersion > JavaVersion.VERSION_15) {
def includeErrorProne = rootProject.runtimeJavaVersion <= JavaVersion.VERSION_15;
if (!includeErrorProne) {
logger.warn("WARNING: errorprone disabled (won't work with JDK ${rootProject.runtimeJavaVersion})")
return
}
allprojects { prj ->
@ -29,6 +28,8 @@ allprojects { prj ->
errorprone("com.google.errorprone:error_prone_core")
}
// LUCENE-9650: Errorprone on master/gradle no longer works with JDK-16
if (includeErrorProne) {
tasks.withType(JavaCompile) { task ->
options.errorprone.disableWarningsInGeneratedCode = true
options.errorprone.errorproneArgs = [
@ -152,4 +153,5 @@ allprojects { prj ->
]
}
}
}
}