mirror of https://github.com/sbt/sbt.git
Fix actions/cross-advanced
This commit is contained in:
parent
587d821828
commit
2fb5b372d5
|
|
@ -10,19 +10,19 @@ lazy val root = (project in file("."))
|
|||
|
||||
lazy val foo = project
|
||||
.settings(
|
||||
crossScalaVersions := Seq("2.12.12", "2.13.1"),
|
||||
crossScalaVersions := Seq("2.12.13", "2.13.1"),
|
||||
libraryDependencies += "org.scalatest" %% "scalatest" % "3.1.0",
|
||||
|
||||
check := {
|
||||
// This tests that +check will respect bar's crossScalaVersions and not switch
|
||||
val x = (LocalProject("bar") / scalaVersion).value
|
||||
assert(x == "2.12.12", s"$x == 2.12.12")
|
||||
assert(x == "2.12.13", s"$x == 2.12.12")
|
||||
(Compile / compile).value
|
||||
},
|
||||
(Test / testOnly) := {
|
||||
// This tests that +testOnly will respect bar's crossScalaVersions and not switch
|
||||
val x = (LocalProject("bar") / scalaVersion).value
|
||||
assert(x == "2.12.12", s"$x == 2.12.12")
|
||||
assert(x == "2.12.13", s"$x == 2.12.12")
|
||||
val _ = (Test / testOnly).evaluated
|
||||
},
|
||||
compile2 := {
|
||||
|
|
@ -35,7 +35,7 @@ lazy val foo = project
|
|||
|
||||
lazy val bar = project
|
||||
.settings(
|
||||
crossScalaVersions := Seq("2.12.12"),
|
||||
crossScalaVersions := Seq("2.12.13"),
|
||||
check := (Compile / compile).value,
|
||||
compile2 := (Compile / compile).value,
|
||||
)
|
||||
|
|
@ -46,14 +46,14 @@ lazy val baz = project
|
|||
check := {
|
||||
// This tests that +baz/check will respect bar's crossScalaVersions and not switch
|
||||
val x = (LocalProject("bar") / scalaVersion).value
|
||||
assert(x == "2.12.12", s"$x == 2.12.12")
|
||||
assert(x == "2.12.13", s"$x == 2.12.13")
|
||||
(Compile / compile).value
|
||||
},
|
||||
)
|
||||
|
||||
lazy val client = project
|
||||
.settings(
|
||||
crossScalaVersions := Seq("2.12.12", "2.13.1"),
|
||||
crossScalaVersions := Seq("2.12.13", "2.13.1"),
|
||||
check := (Compile / compile).value,
|
||||
compile2 := (Compile / compile).value,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
## test + with command or alias
|
||||
> clean
|
||||
## for command cross building you do need crossScalaVerions on root
|
||||
> set root/crossScalaVersions := Seq("2.12.12", "2.13.1")
|
||||
> set root/crossScalaVersions := Seq("2.12.13", "2.13.1")
|
||||
> + build
|
||||
$ exists foo/target/scala-2.12
|
||||
$ exists foo/target/scala-2.13
|
||||
|
|
|
|||
Loading…
Reference in New Issue