Browse Source

Build: Allow running errorprone with Java 8

pull/270/head
weisj 3 years ago
parent
commit
2300e6564a
No known key found for this signature in database
GPG Key ID: 31124CB75461DA2A
  1. 3
      build.gradle.kts
  2. 2
      gradle/libs.versions.toml

3
build.gradle.kts

@ -224,6 +224,9 @@ allprojects {
dependencies { dependencies {
"errorprone"(libs.tools.errorprone.core) "errorprone"(libs.tools.errorprone.core)
"annotationProcessor"(libs.tools.errorprone.guava) "annotationProcessor"(libs.tools.errorprone.guava)
if (!JavaVersion.current().isJava9Compatible) {
"errorproneJavac"(libs.tools.errorprone.javac)
}
} }
tasks.withType<JavaCompile>().configureEach { tasks.withType<JavaCompile>().configureEach {
options.compilerArgs.addAll(listOf("-Xmaxerrs", "10000", "-Xmaxwarns", "10000", "-Werror")) options.compilerArgs.addAll(listOf("-Xmaxerrs", "10000", "-Xmaxwarns", "10000", "-Werror"))

2
gradle/libs.versions.toml

@ -13,6 +13,7 @@ nullabilityAnnotations = "16.0.2"
macOSFramework = "latest.release" macOSFramework = "latest.release"
javaNativeFoundation = "1.1.1" javaNativeFoundation = "1.1.1"
errorprone = "2.8.1" errorprone = "2.8.1"
errorproneCompiler = "9+181-r4173-1"
guava = "1.0" guava = "1.0"
javaxAnnotations = "1.3.2" javaxAnnotations = "1.3.2"
@ -48,6 +49,7 @@ test-jna = { module = "net.java.dev.jna:jna", version.ref = "jna" }
tools-errorprone-core = { module = "com.google.errorprone:error_prone_core", version.ref = "errorprone" } tools-errorprone-core = { module = "com.google.errorprone:error_prone_core", version.ref = "errorprone" }
tools-errorprone-annotations = { module = "com.google.errorprone:error_prone_annotations", version.ref = "errorprone" } tools-errorprone-annotations = { module = "com.google.errorprone:error_prone_annotations", version.ref = "errorprone" }
tools-errorprone-guava = { module = "com.google.guava:guava-beta-checker", version.ref = "guava" } tools-errorprone-guava = { module = "com.google.guava:guava-beta-checker", version.ref = "guava" }
tools-errorprone-javac = { module = "com.google.errorprone:javac", version.ref = "errorproneCompiler" }
[bundles] [bundles]
test-miglayout = ["test-miglayout-core", "test-miglayout-swing"] test-miglayout = ["test-miglayout-core", "test-miglayout-swing"]

Loading…
Cancel
Save