Skip to content

Commit ace5df8

Browse files
committed
Add the Spring IO plugin
Configure the Spring IO plugin such that it's only applied when the build is run with -PplatformVersion=<version>. 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.
1 parent a3eece6 commit ace5df8

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

build.gradle

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ buildscript {
55
dependencies {
66
classpath 'org.springframework.build.gradle:propdeps-plugin:0.0.6'
77
classpath 'org.springframework.build.gradle:docbook-reference-plugin:0.2.7'
8+
classpath 'org.springframework.build.gradle:spring-io-plugin:0.0.3.RELEASE'
89
}
910
}
1011

@@ -42,7 +43,7 @@ configure(allprojects) {
4243

4344
sourceSets.test.resources.srcDirs = ['src/test/resources', 'src/test/java']
4445

45-
test {
46+
tasks.withType(Test).all {
4647
systemProperty("java.awt.headless", "true")
4748
systemProperty("testGroups", project.properties.get("testGroups"))
4849
scanForTestClasses = false
@@ -79,6 +80,18 @@ configure(subprojects) { subproject ->
7980
apply plugin: "maven"
8081
apply from: "${rootProject.projectDir}/publish-maven.gradle"
8182

83+
if (project.hasProperty('platformVersion')) {
84+
apply plugin: 'spring-io'
85+
86+
repositories {
87+
maven { url "https://repo.spring.io/libs-snapshot" }
88+
}
89+
90+
dependencies {
91+
springIoVersions "io.spring.platform:platform-versions:${platformVersion}@properties"
92+
}
93+
}
94+
8295
jar {
8396
manifest.attributes["Created-By"] =
8497
"${System.getProperty("java.version")} (${System.getProperty("java.specification.vendor")})"

0 commit comments

Comments
 (0)