mirror of https://github.com/sbt/sbt.git
relax dependency-management/compiler-bridge-binary
This commit is contained in:
parent
21782a51f0
commit
35a0ee4321
|
|
@ -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"))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1 +1,2 @@
|
|||
> check
|
||||
> compile
|
||||
|
|
|
|||
Loading…
Reference in New Issue