Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow using a projectref across scala versions with cross building
Reproduces sbt#5497 and contains the fix by @ignasi35 from sbt#5494 - I'm not seeing actions/cross-test-only fail here
- Loading branch information
Showing
3 changed files
with
30 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
sbt/src/sbt-test/actions/cross-build-with-projectref/build.sbt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
val b = Project("b", file("b")) | ||
.settings( | ||
crossScalaVersions := Seq("2.12.10", "2.13.1"), | ||
compile in Compile := { | ||
// We'd like to be able to inspect to this 2.12-only project | ||
// even while compiling the 2.13 version of 'b' | ||
(fullClasspath in Compile in ProjectRef(file("."), "c")).value | ||
(compile in Compile).value | ||
} | ||
) | ||
|
||
val c = Project("c", file("c")) | ||
.enablePlugins(SbtPlugin) | ||
.settings( | ||
crossScalaVersions := Seq("2.12.10"), | ||
libraryDependencies += | ||
// Some library that is not available on 2.13 | ||
"com.typesafe.akka" %% "akka-actor" % "2.5.0" | ||
) | ||
|
||
val root = Project("reproduce-5497", file(".")) | ||
.aggregate(b, c) | ||
.settings( | ||
crossScalaVersions := Nil | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
> +compile |