Configure nullability checks with ErrorProne
See gh-1562 Co-authored-by: Andy Wilkinson <andy.wilkinson@broadcom.com> Co-authored-by: Brian Clozel <brian.clozel@broadcom.com>
This commit is contained in:
@@ -15,6 +15,7 @@ dependencies {
|
||||
checkstyle("io.spring.javaformat:spring-javaformat-checkstyle:${javaFormatVersion}")
|
||||
|
||||
implementation("com.github.ben-manes:gradle-versions-plugin:$gradleVersionsPluginVersion")
|
||||
implementation("io.spring.gradle.nullability:nullability-plugin:$nullabilityPluginVersion")
|
||||
implementation("io.spring.javaformat:spring-javaformat-gradle-plugin:$javaFormatVersion")
|
||||
|
||||
testImplementation("org.junit.jupiter:junit-jupiter")
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
package org.springframework.ws.gradle.conventions;
|
||||
|
||||
import io.spring.gradle.nullability.NullabilityPlugin;
|
||||
import org.gradle.api.Plugin;
|
||||
import org.gradle.api.Project;
|
||||
import org.gradle.api.plugins.JavaBasePlugin;
|
||||
@@ -37,7 +38,10 @@ public class ConventionsPlugin implements Plugin<Project> {
|
||||
new JavaBasePluginConventions().apply(project);
|
||||
new CheckstyleConventions().apply(project);
|
||||
});
|
||||
project.getPlugins().withType(JavaPlugin.class).all((plugin) -> new JavaPluginConventions().apply(project));
|
||||
project.getPlugins().withType(JavaPlugin.class).all((plugin) -> {
|
||||
project.getPlugins().apply(NullabilityPlugin.class);
|
||||
new JavaPluginConventions().apply(project);
|
||||
});
|
||||
project.getPlugins()
|
||||
.withType(MavenPublishPlugin.class)
|
||||
.all((plugin) -> new MavenPublishPluginConventions().apply(project));
|
||||
|
||||
@@ -2,3 +2,4 @@ assertJVersion=3.25.3
|
||||
gradleVersionsPluginVersion=0.52.0
|
||||
javaFormatVersion=0.0.45
|
||||
junitVersion=5.11.0
|
||||
nullabilityPluginVersion=0.0.1
|
||||
@@ -8,4 +8,6 @@
|
||||
<suppress files="." checks="SpringMethodVisibility"/>
|
||||
|
||||
<suppress files=".+TransportConstants\.java" checks="InterfaceIsType"/>
|
||||
<!-- Ignore this check for @Nullable annotations -->
|
||||
<suppress files="[\\/]src[\\/]main[\\/]java[\\/]" checks="AnnotationLocation" />
|
||||
</suppressions>
|
||||
Reference in New Issue
Block a user