From c61773af032eb16d9bf511f0ec0f90189152e3ba Mon Sep 17 00:00:00 2001 From: Eugene Yokota Date: Thu, 14 Feb 2019 01:33:23 -0500 Subject: [PATCH] Skip Scala 2.10 and Scala 2.11 components for JDK 11 Scala 2.10 and Scala 2.11 do not support JDK 11. --- .../internal/inc/ZincComponentCompilerSpec.scala | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/internal/zinc-ivy-integration/src/test/scala/sbt/internal/inc/ZincComponentCompilerSpec.scala b/internal/zinc-ivy-integration/src/test/scala/sbt/internal/inc/ZincComponentCompilerSpec.scala index f3245c1ea..2073da404 100644 --- a/internal/zinc-ivy-integration/src/test/scala/sbt/internal/inc/ZincComponentCompilerSpec.scala +++ b/internal/zinc-ivy-integration/src/test/scala/sbt/internal/inc/ZincComponentCompilerSpec.scala @@ -12,16 +12,21 @@ class ZincComponentCompilerSpec extends BridgeProviderSpecification { val scala2122 = "2.12.2" val scala2123 = "2.12.3" val scala2130M2 = "2.13.0-M2" + def isJava8: Boolean = sys.props("java.specification.version") == "1.8" val logger = ConsoleLogger() it should "compile the bridge for Scala 2.10.5 and 2.10.6" in { - IO.withTemporaryDirectory(t => getCompilerBridge(t, logger, scala2105) should exist) - IO.withTemporaryDirectory(t => getCompilerBridge(t, logger, scala2106) should exist) + if (isJava8) { + IO.withTemporaryDirectory(t => getCompilerBridge(t, logger, scala2105) should exist) + IO.withTemporaryDirectory(t => getCompilerBridge(t, logger, scala2106) should exist) + } else () } it should "compile the bridge for Scala 2.11.8 and 2.11.11" in { - IO.withTemporaryDirectory(t => getCompilerBridge(t, logger, scala2118) should exist) - IO.withTemporaryDirectory(t => getCompilerBridge(t, logger, scala21111) should exist) + if (isJava8) { + IO.withTemporaryDirectory(t => getCompilerBridge(t, logger, scala2118) should exist) + IO.withTemporaryDirectory(t => getCompilerBridge(t, logger, scala21111) should exist) + } else () } it should "compile the bridge for Scala 2.12.2" in {