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
This commit is contained in:
@@ -6,7 +6,7 @@ plugins {
|
||||
id 'com.github.bjornvester.xjc' version '1.8.2' apply false
|
||||
id 'io.github.goooler.shadow' version '8.1.8' apply false
|
||||
id 'me.champeau.jmh' version '0.7.2' apply false
|
||||
id "net.ltgt.errorprone" version "4.1.0" apply false
|
||||
id "io.spring.nullability" version "0.0.1" apply false
|
||||
}
|
||||
|
||||
ext {
|
||||
|
||||
@@ -6,15 +6,13 @@ apply plugin: 'org.springframework.build.optional-dependencies'
|
||||
// apply plugin: 'io.github.goooler.shadow'
|
||||
apply plugin: 'me.champeau.jmh'
|
||||
apply from: "$rootDir/gradle/publications.gradle"
|
||||
apply plugin: 'net.ltgt.errorprone'
|
||||
apply plugin: "io.spring.nullability"
|
||||
|
||||
dependencies {
|
||||
jmh 'org.openjdk.jmh:jmh-core:1.37'
|
||||
jmh 'org.openjdk.jmh:jmh-generator-annprocess:1.37'
|
||||
jmh 'org.openjdk.jmh:jmh-generator-bytecode:1.37'
|
||||
jmh 'net.sf.jopt-simple:jopt-simple'
|
||||
errorprone 'com.uber.nullaway:nullaway:0.12.4'
|
||||
errorprone 'com.google.errorprone:error_prone_core:2.36.0'
|
||||
}
|
||||
|
||||
pluginManager.withPlugin("kotlin") {
|
||||
@@ -126,15 +124,3 @@ publishing {
|
||||
components.java.withVariantsFromConfiguration(configurations.testFixturesApiElements) { skip() }
|
||||
components.java.withVariantsFromConfiguration(configurations.testFixturesRuntimeElements) { skip() }
|
||||
|
||||
tasks.withType(JavaCompile).configureEach {
|
||||
options.errorprone {
|
||||
disableAllChecks = true
|
||||
option("NullAway:OnlyNullMarked", "true")
|
||||
option("NullAway:CustomContractAnnotations", "org.springframework.lang.Contract")
|
||||
option("NullAway:JSpecifyMode", "true")
|
||||
}
|
||||
}
|
||||
tasks.compileJava {
|
||||
// The check defaults to a warning, bump it up to an error for the main sources
|
||||
options.errorprone.error("NullAway")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user