Skip to content

Commit 1119cc5

Browse files
authored
Replace Error Prone with Spring Nullability plugin (#3939)
Fixes: #3935 Issue link: #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 <[email protected]>
1 parent a0a2c96 commit 1119cc5

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

build.gradle

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ plugins {
2121
id 'io.spring.nohttp' version '0.0.11'
2222
id 'io.spring.dependency-management' version '1.1.7' apply false
2323
id 'io.freefair.aggregate-javadoc' version '8.11'
24-
id 'net.ltgt.errorprone' version '4.1.0' apply false
24+
id 'io.spring.nullability' version '0.0.1' apply false
2525
}
2626

2727
apply plugin: 'io.spring.nohttp'
@@ -127,7 +127,7 @@ configure(javaProjects) { subproject ->
127127
apply plugin: 'checkstyle'
128128
apply plugin: 'kotlin'
129129
apply plugin: 'kotlin-spring'
130-
apply plugin: 'net.ltgt.errorprone'
130+
apply plugin: 'io.spring.nullability'
131131

132132
apply from: "${rootProject.projectDir}/gradle/publish-maven.gradle"
133133

@@ -145,15 +145,6 @@ configure(javaProjects) { subproject ->
145145
tasks.withType(JavaCompile).configureEach {
146146
sourceCompatibility = JavaVersion.VERSION_17
147147
options.encoding = 'UTF-8'
148-
options.errorprone {
149-
disableAllChecks = true
150-
if (!name.toLowerCase().contains('test')) {
151-
option('NullAway:OnlyNullMarked', 'true')
152-
option('NullAway:CustomContractAnnotations', 'org.springframework.lang.Contract')
153-
option('NullAway:JSpecifyMode', 'true')
154-
error('NullAway')
155-
}
156-
}
157148
}
158149

159150
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask).configureEach {
@@ -186,9 +177,6 @@ configure(javaProjects) { subproject ->
186177
}
187178
testImplementation "org.hamcrest:hamcrest-core:$hamcrestVersion"
188179
optionalApi "org.assertj:assertj-core:$assertjVersion"
189-
190-
errorprone 'com.uber.nullaway:nullaway:0.12.7'
191-
errorprone 'com.google.errorprone:error_prone_core:2.36.0'
192180
}
193181

194182
// enable all compiler warnings; individual projects may customize further

0 commit comments

Comments
 (0)