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 45b36ff commit 310fdba
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 @@ -21,13 +21,15 @@ 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 'org.plumelib:options:2.0.3'
implementation 'org.plumelib:plume-util:1.9.3'

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

application {
Expand Down Expand Up @@ -66,7 +68,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 @@ -75,6 +77,7 @@ tasks.withType(JavaCompile).configureEach {
disable('ExtendsObject') // Incorrect when using the Checker Framework
disable('ReferenceEquality') // Use Interning Checker instead.
}
options.errorprone.enabled = isJava17orHigher
}

// Checker Framework pluggable type-checking
Expand Down

0 comments on commit 310fdba

Please sign in to comment.