From 7b6f1d1b582fc9a7a1c6c3e3ff147dff8cece006 Mon Sep 17 00:00:00 2001 From: Sebastien Deleuze Date: Fri, 22 Sep 2017 13:40:50 +0200 Subject: [PATCH] Use compileOnly and testCompileOnly for JSR 305 JAR This change avoids error messages in logs during test classes compilation which are using @NonNull and @Nullable. --- build.gradle | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/build.gradle b/build.gradle index 7158fa90804..e6ea97527f4 100644 --- a/build.gradle +++ b/build.gradle @@ -52,6 +52,7 @@ configure(allprojects) { project -> ext.jaxbVersion = "2.2.11" ext.jaxwsVersion = "2.2.11" ext.jettyVersion = "9.4.7.v20170914" + ext.jsr305Version = "3.0.2" ext.junitJupiterVersion = '5.0.0' ext.junitPlatformVersion = '1.0.0' ext.junitVintageVersion = "4.12.0" @@ -150,6 +151,9 @@ configure(allprojects) { project -> testCompile("org.hamcrest:hamcrest-all:1.3") testCompile("org.xmlunit:xmlunit-matchers:2.3.0") testRuntime("org.apache.logging.log4j:log4j-core:${log4jVersion}") + + compileOnly("com.google.code.findbugs:jsr305:${jsr305Version}") + testCompileOnly("com.google.code.findbugs:jsr305:${jsr305Version}") } ext.javadocLinks = [ @@ -224,12 +228,6 @@ configure(subprojects - project(":spring-build-src")) { subproject -> } } -configure(moduleProjects) { - dependencies { - provided("com.google.code.findbugs:jsr305:3.0.2") - } -} - configure(rootProject) { description = "Spring Framework"