-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from sbt/wip/sandwich
implement secondary match
- Loading branch information
Showing
12 changed files
with
183 additions
and
11 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
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
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,5 @@ | ||
package example | ||
|
||
object D { | ||
val x = C.x | ||
} |
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,5 @@ | ||
package example | ||
|
||
object C { | ||
val x = 1 | ||
} |
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,5 @@ | ||
package example | ||
|
||
object F { | ||
val x = E.x | ||
} |
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,5 @@ | ||
package example | ||
|
||
object E { | ||
val x = 1 | ||
} |
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,54 @@ | ||
lazy val check = taskKey[Unit]("") | ||
|
||
val dottyVersion = "0.23.0" | ||
ThisBuild / resolvers += "scala-integration" at "https://scala-ci.typesafe.com/artifactory/scala-integration/" | ||
// TODO use 2.13.4 when it's out | ||
lazy val scala213 = "2.13.4-bin-aeee8f0" | ||
|
||
lazy val fooApp = (projectMatrix in file("foo-app")) | ||
.dependsOn(fooCore) | ||
.settings( | ||
name := "foo app", | ||
) | ||
.jvmPlatform(scalaVersions = Seq(dottyVersion)) | ||
|
||
lazy val fooCore = (projectMatrix in file("foo-core")) | ||
.settings( | ||
name := "foo core", | ||
) | ||
.jvmPlatform(scalaVersions = Seq(scala213, "2.12.12")) | ||
|
||
lazy val barApp = (projectMatrix in file("bar-app")) | ||
.dependsOn(barCore) | ||
.settings( | ||
name := "bar app", | ||
) | ||
.jvmPlatform(scalaVersions = Seq(scala213)) | ||
|
||
lazy val barCore = (projectMatrix in file("bar-core")) | ||
.settings( | ||
name := "bar core", | ||
) | ||
.jvmPlatform(scalaVersions = Seq(dottyVersion)) | ||
|
||
// choose 2.13 when bazCore offers both 2.13 and Dotty | ||
lazy val bazApp = (projectMatrix in file("baz-app")) | ||
.dependsOn(bazCore) | ||
.settings( | ||
name := "baz app", | ||
check := { | ||
val cp = (Compile / fullClasspath).value | ||
.map(_.data.getName) | ||
|
||
assert(cp.contains("baz-core_2.13-0.1.0-SNAPSHOT.jar"), s"$cp") | ||
assert(!cp.contains("baz-core_0.23-0.1.0-SNAPSHOT.jar"), s"$cp") | ||
}, | ||
) | ||
.jvmPlatform(scalaVersions = Seq(scala213)) | ||
|
||
lazy val bazCore = (projectMatrix in file("baz-core")) | ||
.settings( | ||
name := "baz core", | ||
exportJars := true, | ||
) | ||
.jvmPlatform(scalaVersions = Seq(scala213, dottyVersion)) |
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,5 @@ | ||
package example | ||
|
||
object B { | ||
val x = A.x | ||
} |
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,5 @@ | ||
package example | ||
|
||
object A { | ||
val x = 1 | ||
} |
1 change: 1 addition & 0 deletions
1
src/sbt-test/projectMatrix/jvm-sandwich/project/build.properties
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 @@ | ||
sbt.version=1.3.13 |
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,6 @@ | ||
sys.props.get("plugin.version") match { | ||
case Some(x) => addSbtPlugin("com.eed3si9n" % "sbt-projectmatrix" % x) | ||
case _ => sys.error("""|The system property 'plugin.version' is not defined. | ||
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin) | ||
} | ||
addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.4.1") |
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,5 @@ | ||
> fooAppJVM0_23/compile | ||
|
||
> barAppJVM2_13/compile | ||
|
||
> bazAppJVM2_13/check |