mirror of https://github.com/sbt/sbt.git
Add test for cross + scoped task
This commit is contained in:
parent
2ad28974c6
commit
5ed54affff
|
|
@ -40,6 +40,17 @@ lazy val bar = project
|
||||||
compile2 := (Compile / compile).value,
|
compile2 := (Compile / compile).value,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
lazy val baz = project
|
||||||
|
.settings(
|
||||||
|
crossScalaVersions := Seq("2.13.1"),
|
||||||
|
check := {
|
||||||
|
// This tests that +baz/check will respect bar's crossScalaVersions and not switch
|
||||||
|
val x = (LocalProject("bar") / scalaVersion).value
|
||||||
|
assert(x == "2.12.11", s"$x == 2.12.11")
|
||||||
|
(Compile / compile).value
|
||||||
|
},
|
||||||
|
)
|
||||||
|
|
||||||
lazy val client = project
|
lazy val client = project
|
||||||
.settings(
|
.settings(
|
||||||
crossScalaVersions := Seq("2.12.11", "2.13.1"),
|
crossScalaVersions := Seq("2.12.11", "2.13.1"),
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,9 @@
|
||||||
> + clean
|
> + clean
|
||||||
|
|
||||||
|
## test scoped task
|
||||||
|
## this should not force any Scala version changes to other subprojects
|
||||||
|
> + baz/check
|
||||||
|
|
||||||
## test input task
|
## test input task
|
||||||
> + foo / testOnly foo.FooSpec
|
> + foo / testOnly foo.FooSpec
|
||||||
> + testOnly foo.FooSpec
|
> + testOnly foo.FooSpec
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue