From ace5df8fb8f527807af76305f649051654f1a7f4 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Wed, 14 May 2014 11:23:52 +0100 Subject: [PATCH] Add the Spring IO plugin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Configure the Spring IO plugin such that it's only applied when the build is run with -PplatformVersion=. This platformVersion property is used to determine the version of the Platform that will be used when running the springIoCheck task. The plugin can be used by running a build as follows: ./gradlew clean springIoCheck -PplatformVersion=1.0.0.BUILD-SNAPSHOT -PJDK8_HOME=… This will test the project on JDK 8 using the dependencies defined in the latest snapshot of Spring IO Platform 1.0.0. --- build.gradle | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 8cc259bff..773e3196c 100644 --- a/build.gradle +++ b/build.gradle @@ -5,6 +5,7 @@ buildscript { dependencies { classpath 'org.springframework.build.gradle:propdeps-plugin:0.0.6' classpath 'org.springframework.build.gradle:docbook-reference-plugin:0.2.7' + classpath 'org.springframework.build.gradle:spring-io-plugin:0.0.3.RELEASE' } } @@ -42,7 +43,7 @@ configure(allprojects) { sourceSets.test.resources.srcDirs = ['src/test/resources', 'src/test/java'] - test { + tasks.withType(Test).all { systemProperty("java.awt.headless", "true") systemProperty("testGroups", project.properties.get("testGroups")) scanForTestClasses = false @@ -79,6 +80,18 @@ configure(subprojects) { subproject -> apply plugin: "maven" apply from: "${rootProject.projectDir}/publish-maven.gradle" + if (project.hasProperty('platformVersion')) { + apply plugin: 'spring-io' + + repositories { + maven { url "https://repo.spring.io/libs-snapshot" } + } + + dependencies { + springIoVersions "io.spring.platform:platform-versions:${platformVersion}@properties" + } + } + jar { manifest.attributes["Created-By"] = "${System.getProperty("java.version")} (${System.getProperty("java.specification.vendor")})"