Skip to content

Commit

Permalink
Use Error Prone 2.32.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mernst authored Sep 12, 2024
1 parent 26762fd commit 87a2040
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,18 @@ repositories {
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
}

ext.errorproneVersion = '2.32.0'
ext {
errorproneVersion = '2.32.0'
isJava17orHigher = JavaVersion.current() >= JavaVersion.VERSION_17
isJava21orHigher = JavaVersion.current() >= JavaVersion.VERSION_21
}

dependencies {
implementation 'io.github.classgraph:classgraph:4.8.175'
implementation 'org.apache.commons:commons-lang3:3.17.0'
implementation 'org.apache.commons:commons-text:1.12.0'
implementation 'org.plumelib:reflection-util:1.1.3'

compileOnly "com.google.errorprone:error_prone_annotations:${errorproneVersion}"

testImplementation 'org.junit.jupiter:junit-jupiter-api:5.11.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
}
Expand Down Expand Up @@ -82,7 +84,7 @@ spotless {
// Error Prone linter

dependencies {
errorprone('com.google.errorprone:error_prone_core:2.31.0')
errorprone("com.google.errorprone:error_prone_core:${errorproneVersion}")
}
tasks.withType(JavaCompile).configureEach {
// "-processing" avoids javac warning "No processor claimed any of these annotations".
Expand All @@ -95,6 +97,7 @@ tasks.withType(JavaCompile).configureEach {
disable('AnnotateFormatMethod') // Error Prone doesn't know about Checker Framework @FormatMethod
disable('UseCorrectAssertInTests') // https://github.com/typetools/checker-framework/issues/3345
}
options.errorprone.enabled = isJava17orHigher
}

// Checker Framework pluggable type-checking
Expand Down

0 comments on commit 87a2040

Please sign in to comment.