diff --git a/spring-restdocs-restassured/build.gradle b/spring-restdocs-restassured/build.gradle index e7c33f79..5f495f50 100644 --- a/spring-restdocs-restassured/build.gradle +++ b/spring-restdocs-restassured/build.gradle @@ -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.*" -} \ No newline at end of file +} + +afterEvaluate { + if (project.hasProperty('platformVersion') && platformUsingBootOneFour) { + dependencies { + springIoTestRuntime 'org.springframework.boot:spring-boot-test' + } + } +}