From 1119cc58da747c24e2bcee7bd1a7662fb5921e00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?HYUNSANG=20HAN=20=28=ED=95=9C=ED=98=84=EC=83=81=2C=20Travi?= =?UTF-8?q?s=29?= Date: Tue, 3 Jun 2025 23:57:22 +0900 Subject: [PATCH] Replace Error Prone with Spring Nullability plugin (#3939) Fixes: #3935 Issue link: https://github.com/spring-projects/spring-kafka/issues/3935 Replaces the Error Prone and NullAway Gradle configuration and dependencies with the `io.spring.nullability` plugin to align null-safety checks with Spring Framework's nullability standards. * Removed `net.ltgt.errorprone` plugin * Removed ErrorProne and NullAway dependencies from the build configuration * Applied `io.spring.nullability` plugin Signed-off-by: Hyunsang Han --- build.gradle | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/build.gradle b/build.gradle index d28fad3d..b1fb16e6 100644 --- a/build.gradle +++ b/build.gradle @@ -21,7 +21,7 @@ plugins { id 'io.spring.nohttp' version '0.0.11' id 'io.spring.dependency-management' version '1.1.7' apply false id 'io.freefair.aggregate-javadoc' version '8.11' - id 'net.ltgt.errorprone' version '4.1.0' apply false + id 'io.spring.nullability' version '0.0.1' apply false } apply plugin: 'io.spring.nohttp' @@ -127,7 +127,7 @@ configure(javaProjects) { subproject -> apply plugin: 'checkstyle' apply plugin: 'kotlin' apply plugin: 'kotlin-spring' - apply plugin: 'net.ltgt.errorprone' + apply plugin: 'io.spring.nullability' apply from: "${rootProject.projectDir}/gradle/publish-maven.gradle" @@ -145,15 +145,6 @@ configure(javaProjects) { subproject -> tasks.withType(JavaCompile).configureEach { sourceCompatibility = JavaVersion.VERSION_17 options.encoding = 'UTF-8' - options.errorprone { - disableAllChecks = true - if (!name.toLowerCase().contains('test')) { - option('NullAway:OnlyNullMarked', 'true') - option('NullAway:CustomContractAnnotations', 'org.springframework.lang.Contract') - option('NullAway:JSpecifyMode', 'true') - error('NullAway') - } - } } tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask).configureEach { @@ -186,9 +177,6 @@ configure(javaProjects) { subproject -> } testImplementation "org.hamcrest:hamcrest-core:$hamcrestVersion" optionalApi "org.assertj:assertj-core:$assertjVersion" - - errorprone 'com.uber.nullaway:nullaway:0.12.7' - errorprone 'com.google.errorprone:error_prone_core:2.36.0' } // enable all compiler warnings; individual projects may customize further