diff --git a/src/sbt-test/projectMatrix/jvm-sandwich-sbt-1.3/bar-app/D.scala b/src/sbt-test/projectMatrix/jvm-sandwich-sbt-1.3/bar-app/D.scala new file mode 100644 index 000000000..b937ae06c --- /dev/null +++ b/src/sbt-test/projectMatrix/jvm-sandwich-sbt-1.3/bar-app/D.scala @@ -0,0 +1,5 @@ +package example + +object D { + val x = C.x +} diff --git a/src/sbt-test/projectMatrix/jvm-sandwich-sbt-1.3/bar-core/C.scala b/src/sbt-test/projectMatrix/jvm-sandwich-sbt-1.3/bar-core/C.scala new file mode 100644 index 000000000..4d4fcc6df --- /dev/null +++ b/src/sbt-test/projectMatrix/jvm-sandwich-sbt-1.3/bar-core/C.scala @@ -0,0 +1,5 @@ +package example + +object C { + val x = 1 +} diff --git a/src/sbt-test/projectMatrix/jvm-sandwich-sbt-1.3/baz-app/F.scala b/src/sbt-test/projectMatrix/jvm-sandwich-sbt-1.3/baz-app/F.scala new file mode 100644 index 000000000..5035ba457 --- /dev/null +++ b/src/sbt-test/projectMatrix/jvm-sandwich-sbt-1.3/baz-app/F.scala @@ -0,0 +1,5 @@ +package example + +object F { + val x = E.x +} diff --git a/src/sbt-test/projectMatrix/jvm-sandwich-sbt-1.3/baz-core/E.scala b/src/sbt-test/projectMatrix/jvm-sandwich-sbt-1.3/baz-core/E.scala new file mode 100644 index 000000000..cdac7bd76 --- /dev/null +++ b/src/sbt-test/projectMatrix/jvm-sandwich-sbt-1.3/baz-core/E.scala @@ -0,0 +1,5 @@ +package example + +object E { + val x = 1 +} diff --git a/src/sbt-test/projectMatrix/jvm-sandwich-sbt-1.3/build.sbt b/src/sbt-test/projectMatrix/jvm-sandwich-sbt-1.3/build.sbt new file mode 100644 index 000000000..50014c4b8 --- /dev/null +++ b/src/sbt-test/projectMatrix/jvm-sandwich-sbt-1.3/build.sbt @@ -0,0 +1,54 @@ +lazy val check = taskKey[Unit]("") + +val dottyVersion = "3.0.0-M1" +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_3.0.0-M1-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)) diff --git a/src/sbt-test/projectMatrix/jvm-sandwich-sbt-1.3/foo-app/B.scala b/src/sbt-test/projectMatrix/jvm-sandwich-sbt-1.3/foo-app/B.scala new file mode 100644 index 000000000..ed82c07d1 --- /dev/null +++ b/src/sbt-test/projectMatrix/jvm-sandwich-sbt-1.3/foo-app/B.scala @@ -0,0 +1,5 @@ +package example + +object B { + val x = A.x +} diff --git a/src/sbt-test/projectMatrix/jvm-sandwich-sbt-1.3/foo-core/A.scala b/src/sbt-test/projectMatrix/jvm-sandwich-sbt-1.3/foo-core/A.scala new file mode 100644 index 000000000..be4b82a9f --- /dev/null +++ b/src/sbt-test/projectMatrix/jvm-sandwich-sbt-1.3/foo-core/A.scala @@ -0,0 +1,5 @@ +package example + +object A { + val x = 1 +} diff --git a/src/sbt-test/projectMatrix/jvm-sandwich-sbt-1.3/project/build.properties b/src/sbt-test/projectMatrix/jvm-sandwich-sbt-1.3/project/build.properties new file mode 100644 index 000000000..c19c768d6 --- /dev/null +++ b/src/sbt-test/projectMatrix/jvm-sandwich-sbt-1.3/project/build.properties @@ -0,0 +1 @@ +sbt.version=1.4.2 diff --git a/src/sbt-test/projectMatrix/jvm-sandwich-sbt-1.3/project/plugins.sbt b/src/sbt-test/projectMatrix/jvm-sandwich-sbt-1.3/project/plugins.sbt new file mode 100644 index 000000000..2db30a892 --- /dev/null +++ b/src/sbt-test/projectMatrix/jvm-sandwich-sbt-1.3/project/plugins.sbt @@ -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.5") diff --git a/src/sbt-test/projectMatrix/jvm-sandwich-sbt-1.3/test b/src/sbt-test/projectMatrix/jvm-sandwich-sbt-1.3/test new file mode 100644 index 000000000..0450417ab --- /dev/null +++ b/src/sbt-test/projectMatrix/jvm-sandwich-sbt-1.3/test @@ -0,0 +1,5 @@ +> fooApp3_0/compile + +> barApp/compile + +> bazApp/check diff --git a/src/sbt-test/projectMatrix/jvm-sandwich/build.sbt b/src/sbt-test/projectMatrix/jvm-sandwich/build.sbt index 9a34ee49b..144beadf5 100644 --- a/src/sbt-test/projectMatrix/jvm-sandwich/build.sbt +++ b/src/sbt-test/projectMatrix/jvm-sandwich/build.sbt @@ -1,6 +1,6 @@ lazy val check = taskKey[Unit]("") -val dottyVersion = "0.23.0" +val dottyVersion = "3.0.0-M1" 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" @@ -40,8 +40,9 @@ lazy val bazApp = (projectMatrix in file("baz-app")) val cp = (Compile / fullClasspath).value .map(_.data.getName) + streams.value.log.info(cp.toString) 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") + assert(!cp.contains("baz-core_3.0.0-M1-0.1.0-SNAPSHOT.jar"), s"$cp") }, ) .jvmPlatform(scalaVersions = Seq(scala213)) diff --git a/src/sbt-test/projectMatrix/jvm-sandwich/project/build.properties b/src/sbt-test/projectMatrix/jvm-sandwich/project/build.properties index 0837f7a13..c19c768d6 100644 --- a/src/sbt-test/projectMatrix/jvm-sandwich/project/build.properties +++ b/src/sbt-test/projectMatrix/jvm-sandwich/project/build.properties @@ -1 +1 @@ -sbt.version=1.3.13 +sbt.version=1.4.2 diff --git a/src/sbt-test/projectMatrix/jvm-sandwich/project/plugins.sbt b/src/sbt-test/projectMatrix/jvm-sandwich/project/plugins.sbt index c129c032b..2db30a892 100644 --- a/src/sbt-test/projectMatrix/jvm-sandwich/project/plugins.sbt +++ b/src/sbt-test/projectMatrix/jvm-sandwich/project/plugins.sbt @@ -3,4 +3,4 @@ sys.props.get("plugin.version") match { 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") +addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.4.5") diff --git a/src/sbt-test/projectMatrix/jvm-sandwich/test b/src/sbt-test/projectMatrix/jvm-sandwich/test index 762592688..0450417ab 100644 --- a/src/sbt-test/projectMatrix/jvm-sandwich/test +++ b/src/sbt-test/projectMatrix/jvm-sandwich/test @@ -1,4 +1,4 @@ -> fooApp0_23/compile +> fooApp3_0/compile > barApp/compile