Tolerate relocated test-related classes in Spring Boot 1.4

This commit is contained in:
Andy Wilkinson
2016-02-22 10:13:35 +00:00
parent 67920dd9f6
commit ee865ce4ed

View File

@@ -1,3 +1,8 @@
boolean isPlatformUsingBootOneFour() {
def bootVersion = dependencyManagement.springIoTestRuntime.managedVersions['org.springframework.boot:spring-boot']
bootVersion.startsWith('1.4')
}
dependencies {
compile project(':spring-restdocs-core')
compile 'com.jayway.restassured:rest-assured'
@@ -13,4 +18,12 @@ dependencies {
test {
jvmArgs "-javaagent:${configurations.jacoco.asPath}=destfile=${buildDir}/jacoco.exec,includes=org.springframework.restdocs.*"
}
}
afterEvaluate {
if (project.hasProperty('platformVersion') && platformUsingBootOneFour) {
dependencies {
springIoTestRuntime 'org.springframework.boot:spring-boot-test'
}
}
}