Skip to content

Commit 095c9b3

Browse files
committed
compiles with Scala 3.0.0-M1 (tests missing)
- we're waiting for scala-test
1 parent 95699f3 commit 095c9b3

File tree

4 files changed

+15
-10
lines changed

4 files changed

+15
-10
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,5 @@ scala-swing.iml
3030
.DS_Store
3131

3232
target/
33+
/.bloop/
34+
/.bsp/

build.sbt

+10-7
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
lazy val scalaTestVersion = "3.2.2"
22

33
lazy val commonSettings = Seq(
4-
crossScalaVersions += "0.27.0-RC1",
5-
scalaVersion := "0.27.0-RC1", // while working in IntelliJ
4+
crossScalaVersions += "3.0.0-M1",
5+
scalaVersion := "3.0.0-M1", // while working in IntelliJ
66
)
77

88
lazy val swing = project.in(file("."))
@@ -15,17 +15,20 @@ lazy val swing = project.in(file("."))
1515
scalaModuleMimaPreviousVersion := Some("2.1.0"),
1616
// set the prompt (for this build) to include the project id.
1717
ThisBuild / shellPrompt := { state => Project.extract(state).currentRef.project + "> " },
18-
libraryDependencies ++= Seq(
19-
"org.scalatest" %% "scalatest-flatspec" % scalaTestVersion % Test,
20-
"org.scalatest" %% "scalatest-shouldmatchers" % scalaTestVersion % Test,
21-
),
18+
libraryDependencies ++= {
19+
if (scalaVersion.value == "3.0.0-M1") Nil else
20+
Seq(
21+
"org.scalatest" %% "scalatest-flatspec" % scalaTestVersion % Test,
22+
"org.scalatest" %% "scalatest-shouldmatchers" % scalaTestVersion % Test,
23+
)
24+
},
2225
// Adds a `src/main/scala-2.13+` source directory for Scala 2.13 and newer
2326
// and a `src/main/scala-2.13-` source directory for Scala version older than 2.13
2427
Compile / unmanagedSourceDirectories += {
2528
val sourceDir = (Compile / sourceDirectory).value
2629
CrossVersion.partialVersion(scalaVersion.value) match {
2730
case Some((2, n)) if n >= 13 => sourceDir / "scala-2.13+"
28-
case Some((0, _)) => sourceDir / "scala-2.13+" // Dotty
31+
case Some((3, _)) => sourceDir / "scala-2.13+" // Dotty
2932
case _ => sourceDir / "scala-2.13-"
3033
}
3134
}

project/build.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=1.3.13
1+
sbt.version=1.4.2

project/plugins.sbt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
addSbtPlugin("org.scala-lang.modules" % "sbt-scala-module" % "2.2.2")
2-
addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.4.2") // cross-compile for dotty
1+
addSbtPlugin("org.scala-lang.modules" % "sbt-scala-module" % "2.2.3")
2+
addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.4.5") // cross-compile for dotty

0 commit comments

Comments
 (0)