Gradle: Disable ScalaTests when TARGET_JAVA_HOME is set

Previously, ScalaTests were only disabled when running Gradle with JDK 7.
Gradle 5+ only runs on JDK 8+, so when cross-compiling and testing JDK 7
we need to check for this state and disable ScalaTests.
This commit is contained in:
str4d
2019-02-17 09:30:53 +00:00
parent f9c13968a8
commit def939284c
2 changed files with 2 additions and 2 deletions

View File

@@ -24,7 +24,7 @@ dependencies {
testCompile 'org.scalatest:scalatest_2.12:3.0.4'
}
if (JavaVersion.current() != JavaVersion.VERSION_1_7) {
if (System.getenv("TARGET_JAVA_HOME") == null && JavaVersion.current() != JavaVersion.VERSION_1_7) {
sourceSets {
test {
scala {

View File

@@ -45,7 +45,7 @@ dependencies {
testCompile 'org.scalatest:scalatest_2.12:3.0.4'
}
if (JavaVersion.current() != JavaVersion.VERSION_1_7) {
if (System.getenv("TARGET_JAVA_HOME") == null && JavaVersion.current() != JavaVersion.VERSION_1_7) {
sourceSets {
test {
scala {