From 76a3e6e6e1dae6b73d7ce2028e36876d7fc2fd65 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Mon, 18 Aug 2014 13:33:16 +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 5c7f5df34f..377b665eff 100644 --- a/build.gradle +++ b/build.gradle @@ -8,6 +8,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) @@ -944,8 +950,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 { @@ -991,7 +997,7 @@ configure(rootProject) { into "${baseDir}/schema" } - subprojects.each { subproject -> + moduleProjects.each { subproject -> into ("${baseDir}/libs") { from subproject.jar if (subproject.tasks.findByPath("sourcesJar")) {