mirror of https://github.com/sbt/sbt.git
Update cross test
This commit is contained in:
parent
56cf50ff23
commit
6035bc02ef
|
|
@ -1,20 +1,24 @@
|
|||
scalaVersion in ThisBuild := "2.7.7"
|
||||
ThisBuild / scalaVersion := "2.11.12"
|
||||
|
||||
scalaVersion := "2.9.1"
|
||||
lazy val root = (project in file("."))
|
||||
.settings(
|
||||
scalaVersion := "2.12.11",
|
||||
|
||||
scalaVersion in update := {
|
||||
scalaVersion.value match {
|
||||
case "2.9.1" => "2.9.0-1"
|
||||
case "2.8.2" => "2.8.1"
|
||||
case x => x
|
||||
}
|
||||
}
|
||||
update / scalaVersion := {
|
||||
scalaVersion.value match {
|
||||
case "2.12.11" => "2.12.10"
|
||||
case "2.11.12" => "2.11.11"
|
||||
case x => x
|
||||
}
|
||||
},
|
||||
|
||||
InputKey[Unit]("check") := {
|
||||
val args = Def.spaceDelimited().parsed
|
||||
def check(label: String, i: Int, actual: String) =
|
||||
assert(args(i) == actual, s"Expected $label='${args(i)}' got '$actual'")
|
||||
check("scalaVersion in ThisBuild", 0, scalaVersion in ThisBuild value)
|
||||
check("scalaVersion", 1, scalaVersion.value)
|
||||
check("scalaVersion in update", 2, scalaVersion in update value)
|
||||
}
|
||||
InputKey[Unit]("check") := {
|
||||
val args = Def.spaceDelimited().parsed
|
||||
def checkV(label: String, i: Int, actual: String) =
|
||||
assert(args(i) == actual, s"Expected $label='${args(i)}' got '$actual'")
|
||||
|
||||
checkV("ThisBuild / scalaVersion", 0, (ThisBuild / scalaVersion).value)
|
||||
checkV("scalaVersion", 1, scalaVersion.value)
|
||||
checkV("update / scalaVersion", 2, (update / scalaVersion).value)
|
||||
}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,8 +1,11 @@
|
|||
> check 2.7.7 2.9.1 2.9.0-1
|
||||
> ++ 2.8.2!
|
||||
> check 2.8.2 2.8.2 2.8.1
|
||||
> ++ 2.10.4!
|
||||
> check 2.11.12 2.12.11 2.12.10
|
||||
|
||||
> ++ 2.11.12!
|
||||
> check 2.11.12 2.11.12 2.11.11
|
||||
|
||||
> ++ 2.13.1!
|
||||
> set resolvers ++= Nil
|
||||
> check 2.10.4 2.10.4 2.10.4
|
||||
> check 2.13.1 2.13.1 2.13.1
|
||||
|
||||
> session clear-all
|
||||
> check 2.7.7 2.9.1 2.9.0-1
|
||||
> check 2.11.12 2.12.11 2.12.10
|
||||
|
|
|
|||
Loading…
Reference in New Issue