diff --git a/build.gradle b/build.gradle index 9e03463..e943d27 100644 --- a/build.gradle +++ b/build.gradle @@ -1,3 +1,5 @@ +apply plugin: 'base' + buildscript { repositories { maven { url 'http://repo.springsource.org/plugins-release' } @@ -52,7 +54,9 @@ subprojects { from sourceSets.main.allSource } - artifacts.archives packageSources + artifacts { + archives packageSources + } dependencies { testCompile("junit:junit:$junitVersion") @@ -69,3 +73,43 @@ subprojects { } } +configure(rootProject) { + task schemaZip(type: Zip) { + group = 'Distribution' + classifier = 'schema' + description = "Builds -${classifier} archive containing all " + + "XSDs for deployment at static.springframework.org/schema." + + subprojects.each { subproject -> + def Properties schemas = new Properties(); + def shortName = subproject.name + + subproject.sourceSets.main.resources.find { + it.path.endsWith('META-INF/spring.schemas') + }?.withInputStream { schemas.load(it) } + + for (def key : schemas.keySet()) { + File xsdFile = subproject.sourceSets.main.resources.find { + it.path.endsWith(schemas.get(key)) + } + assert xsdFile != null + into ("cloud/${shortName}") { + from xsdFile.path + } + } + } + } + + artifacts { + archives schemaZip + } +} + +task dist(dependsOn: assemble) { + group = 'Distribution' + description = 'Builds -dist, -docs and -schema distribution archives.' +} + +task wrapper(type: Wrapper) { + gradleVersion = '1.11' +} \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index d49b5b7..f82b3fc 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Mon Feb 10 11:26:10 PST 2014 +#Thu Mar 20 12:11:25 PDT 2014 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=http\://services.gradle.org/distributions/gradle-1.10-bin.zip +distributionUrl=http\://services.gradle.org/distributions/gradle-1.11-bin.zip