Add test for cross + scoped task

This commit is contained in:
Eugene Yokota 2020-04-23 23:11:42 -04:00
parent 2ad28974c6
commit 5ed54affff
2 changed files with 15 additions and 0 deletions

View File

@ -40,6 +40,17 @@ lazy val bar = project
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
.settings(
crossScalaVersions := Seq("2.12.11", "2.13.1"),

View File

@ -1,5 +1,9 @@
> + clean
## test scoped task
## this should not force any Scala version changes to other subprojects
> + baz/check
## test input task
> + foo / testOnly foo.FooSpec
> + testOnly foo.FooSpec