From a95a3ae4ec73eca52734f5e16215aa43fe4b10d2 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Mon, 18 Aug 2014 12:20:24 +0200 Subject: [PATCH] Exclude infra modules from public distribution Prior to this commit, spring-build-src and spring-framework-bom internal artifacts were published as part of the distribution bundle. This commit excludes those projects so that those unnecessary artifacts are no longer shipped. Issue: SPR-12087 --- build.gradle | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index e99c1a8829f..c57593faea6 100644 --- a/build.gradle +++ b/build.gradle @@ -9,6 +9,12 @@ buildscript { } } +ext { + moduleProjects = subprojects.findAll { + !it.name.equals('spring-build-src') && !it.name.equals('spring-framework-bom') + } +} + configure(allprojects) { project -> group = "org.springframework" version = qualifyVersionIfNecessary(version) @@ -1088,8 +1094,8 @@ configure(rootProject) { classifier = "schema" description = "Builds -${classifier} archive containing all " + "XSDs for deployment at http://springframework.org/schema." - - subprojects.each { subproject -> + duplicatesStrategy 'exclude' + moduleProjects.each { subproject -> def Properties schemas = new Properties(); subproject.sourceSets.main.resources.find { @@ -1135,7 +1141,7 @@ configure(rootProject) { into "${baseDir}/schema" } - subprojects.each { subproject -> + moduleProjects.each { subproject -> into ("${baseDir}/libs") { from subproject.jar if (subproject.tasks.findByPath("sourcesJar")) {