From 5bf0f67c2d18642bef49c4d054a63b15aa100adc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonard=20Br=C3=BCnings?= Date: Mon, 8 Aug 2016 21:04:11 +0200 Subject: [PATCH] Change boot-test to only execute when Java 7 or higher is available Since 1.4.0.RELEASE the spring-boot-gradle plugin requires at least Java 7 so we decided to follow this version requirement for this subproject. --- settings.gradle | 5 ++++- spock-spring/boot-test/boot-test.gradle | 10 +--------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/settings.gradle b/settings.gradle index 77b6bdfab1..2dd5baedd9 100755 --- a/settings.gradle +++ b/settings.gradle @@ -1,13 +1,16 @@ include "spock-core" include "spock-specs" include "spock-spring" -include "spock-spring:boot-test" include "spock-guice" include "spock-tapestry" include "spock-unitils" include "spock-report" include "spock-gradle" +if (JavaVersion.current().java7Compatible) { + include "spock-spring:boot-test" +} + rootProject.name = "spock" nameBuildScriptsAfterProjectNames(rootProject.children) diff --git a/spock-spring/boot-test/boot-test.gradle b/spock-spring/boot-test/boot-test.gradle index 81e7db605f..fbd166c9cc 100644 --- a/spock-spring/boot-test/boot-test.gradle +++ b/spock-spring/boot-test/boot-test.gradle @@ -17,18 +17,10 @@ apply plugin: 'spring-boot' -ext['tomcat.version'] = '7.0.59' // use Tomcat 7 to ensure Java 6 compatibility dependencies { - compile("org.springframework.boot:spring-boot-starter-data-jpa") { - // for Java 6 compatibility, see http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#how-to-use-java-6-jta-api - exclude group: "javax.transaction", module: "javax.transaction-api" - } - - compile "org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec:1.0.0.Final" - + compile "org.springframework.boot:spring-boot-starter-data-jpa" compile "org.springframework.boot:spring-boot-starter-web" - testCompile "org.springframework.boot:spring-boot-starter-test" testCompile project(":spock-core")