diff --git a/sbt/src/sbt-test/dependency-management/compiler-bridge-binary/build.sbt b/sbt/src/sbt-test/dependency-management/compiler-bridge-binary/build.sbt index a3b3bf1f4..6f8d12fb0 100644 --- a/sbt/src/sbt-test/dependency-management/compiler-bridge-binary/build.sbt +++ b/sbt/src/sbt-test/dependency-management/compiler-bridge-binary/build.sbt @@ -1,4 +1,6 @@ -scalaVersion := "2.12.6" +ThisBuild / scalaVersion := "2.12.6" + +lazy val check = taskKey[Unit]("") // We can't use "%%" here without breaking the "== bridgeModule" check below val bridgeModule = "org.scala-sbt" % s"compiler-bridge_2.12" % "1.2.1" @@ -10,7 +12,14 @@ scalaCompilerBridgeSource := "shouldnotbeused" % "dummy" % "dummy" scalaCompilerBridgeBinaryJar := { for { toolReport <- update.value.configuration(Configurations.ScalaTool) - m <- toolReport.modules.find(m => m.module == bridgeModule) + m <- toolReport.modules.find(m => m.module.name == bridgeModule.name) (_, file) <- m.artifacts.find(art => art._1.`type` == Artifact.DefaultType) } yield file } + +check := { + val toolReport = update.value.configuration(Configurations.ScalaTool).get + val m = toolReport.modules.find(m => m.module.name == bridgeModule.name) + val bridge = scalaCompilerBridgeBinaryJar.value + bridge.getOrElse(sys.error(s"bridge JAR is missing: $toolReport")) +} diff --git a/sbt/src/sbt-test/dependency-management/compiler-bridge-binary/test b/sbt/src/sbt-test/dependency-management/compiler-bridge-binary/test index 5df2af1f3..5f1fbe2c5 100644 --- a/sbt/src/sbt-test/dependency-management/compiler-bridge-binary/test +++ b/sbt/src/sbt-test/dependency-management/compiler-bridge-binary/test @@ -1 +1,2 @@ +> check > compile