Skip to content

Commit ebf8d4f

Browse files
committed
Use Gradle nullability plugin 0.0.1
This commit replaces manual Gradle configuration of Error Prone and NullAway by https://github.com/spring-gradle-plugins/nullability-plugin. Closes gh-34983
1 parent 0b14d67 commit ebf8d4f

File tree

2 files changed

+2
-16
lines changed

2 files changed

+2
-16
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ plugins {
66
id 'com.github.bjornvester.xjc' version '1.8.2' apply false
77
id 'io.github.goooler.shadow' version '8.1.8' apply false
88
id 'me.champeau.jmh' version '0.7.2' apply false
9-
id "net.ltgt.errorprone" version "4.1.0" apply false
9+
id "io.spring.nullability" version "0.0.1" apply false
1010
}
1111

1212
ext {

gradle/spring-module.gradle

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,13 @@ apply plugin: 'org.springframework.build.optional-dependencies'
66
// apply plugin: 'io.github.goooler.shadow'
77
apply plugin: 'me.champeau.jmh'
88
apply from: "$rootDir/gradle/publications.gradle"
9-
apply plugin: 'net.ltgt.errorprone'
9+
apply plugin: "io.spring.nullability"
1010

1111
dependencies {
1212
jmh 'org.openjdk.jmh:jmh-core:1.37'
1313
jmh 'org.openjdk.jmh:jmh-generator-annprocess:1.37'
1414
jmh 'org.openjdk.jmh:jmh-generator-bytecode:1.37'
1515
jmh 'net.sf.jopt-simple:jopt-simple'
16-
errorprone 'com.uber.nullaway:nullaway:0.12.4'
17-
errorprone 'com.google.errorprone:error_prone_core:2.36.0'
1816
}
1917

2018
pluginManager.withPlugin("kotlin") {
@@ -126,15 +124,3 @@ publishing {
126124
components.java.withVariantsFromConfiguration(configurations.testFixturesApiElements) { skip() }
127125
components.java.withVariantsFromConfiguration(configurations.testFixturesRuntimeElements) { skip() }
128126

129-
tasks.withType(JavaCompile).configureEach {
130-
options.errorprone {
131-
disableAllChecks = true
132-
option("NullAway:OnlyNullMarked", "true")
133-
option("NullAway:CustomContractAnnotations", "org.springframework.lang.Contract")
134-
option("NullAway:JSpecifyMode", "true")
135-
}
136-
}
137-
tasks.compileJava {
138-
// The check defaults to a warning, bump it up to an error for the main sources
139-
options.errorprone.error("NullAway")
140-
}

0 commit comments

Comments
 (0)