Skip to content

Commit f75f44e

Browse files
committed
Scala 3.0.0-RC2 + sbt 1.5
1 parent 07062b8 commit f75f44e

File tree

4 files changed

+23
-14
lines changed

4 files changed

+23
-14
lines changed

.travis.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ scala:
88
- 2.11.12
99
- 2.12.13
1010
- 2.13.5
11-
- 3.0.0-M3
1211
- 3.0.0-RC1
12+
- 3.0.0-RC2
1313

1414
env:
1515
- SCALAJS_VERSION= ADOPTOPENJDK=8
@@ -39,16 +39,16 @@ matrix:
3939

4040
# Scala Native doesn't support Scala 3 yet
4141

42-
- scala: 3.0.0-M3
42+
- scala: 3.0.0-RC1
4343
env: SCALANATIVE_VERSION=0.4.0 ADOPTOPENJDK=8
4444

45-
- scala: 3.0.0-M3
45+
- scala: 3.0.0-RC1
4646
env: SCALANATIVE_VERSION=0.4.0 ADOPTOPENJDK=11
4747

48-
- scala: 3.0.0-RC1
48+
- scala: 3.0.0-RC2
4949
env: SCALANATIVE_VERSION=0.4.0 ADOPTOPENJDK=8
5050

51-
- scala: 3.0.0-RC1
51+
- scala: 3.0.0-RC2
5252
env: SCALANATIVE_VERSION=0.4.0 ADOPTOPENJDK=11
5353

5454
install:

build.sbt

+17-7
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ lazy val junit = libraryDependencies += "com.novocode" % "junit-interface" % "0.
5555
lazy val scala211 = "2.11.12"
5656
lazy val scala212 = "2.12.13"
5757
lazy val scala213 = "2.13.5"
58-
lazy val scala30 = "3.0.0-RC1"
58+
lazy val scala30 = "3.0.0-RC2"
5959

6060
lazy val compat = MultiScalaCrossProject(JSPlatform, JVMPlatform, NativePlatform)(
6161
"compat",
@@ -67,16 +67,23 @@ lazy val compat = MultiScalaCrossProject(JSPlatform, JVMPlatform, NativePlatform
6767
scalacOptions ++= Seq("-feature", "-language:higherKinds", "-language:implicitConversions"),
6868
Compile / unmanagedSourceDirectories += {
6969
val sharedSourceDir = (ThisBuild / baseDirectory).value / "compat/src/main"
70-
if (scalaVersion.value.startsWith("2.13.") || isDotty.value) sharedSourceDir / "scala-2.13"
71-
else sharedSourceDir / "scala-2.11_2.12"
70+
CrossVersion.partialVersion(scalaVersion.value) match {
71+
case Some((3, _) | (2, 13)) =>
72+
sharedSourceDir / "scala-2.13"
73+
case _ =>
74+
sharedSourceDir / "scala-2.11_2.12"
75+
}
7276
},
7377
versionScheme := Some("early-semver"),
7478
versionPolicyIntention := Compatibility.BinaryCompatible,
7579
)
7680
.jvmSettings(
7781
Test / unmanagedSourceDirectories += (ThisBuild / baseDirectory).value / "compat/src/test/scala-jvm",
7882
junit,
79-
scalaModuleMimaPreviousVersion := Some("2.4.0").filterNot(_ => isDotty.value),
83+
scalaModuleMimaPreviousVersion := (CrossVersion.partialVersion(scalaVersion.value) match {
84+
case Some((3, _)) => None
85+
case _ => Some("2.4.0")
86+
}),
8087
mimaBinaryIssueFilters ++= {
8188
import com.typesafe.tools.mima.core._
8289
import com.typesafe.tools.mima.core.ProblemFilters._
@@ -92,7 +99,10 @@ lazy val compat = MultiScalaCrossProject(JSPlatform, JVMPlatform, NativePlatform
9299
.Process("git rev-parse HEAD")
93100
.lineStream_!
94101
.head
95-
val opt = if (isDotty.value) "-scalajs-mapSourceURI" else "-P:scalajs:mapSourceURI"
102+
val opt = CrossVersion.partialVersion(scalaVersion.value) match {
103+
case Some((3, _)) => "-scalajs-mapSourceURI"
104+
case _ => "-P:scalajs:mapSourceURI"
105+
}
96106
Seq(s"$opt:$x->$y/")
97107
},
98108
Test / fork := false // Scala.js cannot run forked tests
@@ -277,8 +287,8 @@ lazy val `scalafix-tests` = project
277287
output212Plus.value,
278288
output213.value
279289
),
280-
scalafixTestkitInputSourceDirectories := sourceDirectories.in(`scalafix-input`, Compile).value,
281-
scalafixTestkitInputClasspath := fullClasspath.in(`scalafix-input`, Compile).value
290+
scalafixTestkitInputSourceDirectories := (`scalafix-input` / Compile / sourceDirectories).value,
291+
scalafixTestkitInputClasspath := (`scalafix-input` / Compile / fullClasspath).value,
282292
)
283293
.dependsOn(`scalafix-input`, `scalafix-rules`)
284294
.enablePlugins(BuildInfoPlugin, ScalafixTestkitPlugin)

project/build.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=1.4.9
1+
sbt.version=1.5.0-RC2

project/plugins.sbt

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ val scalaJSVersion =
44
val scalaNativeVersion =
55
Option(System.getenv("SCALANATIVE_VERSION")).filter(_.nonEmpty).getOrElse("0.4.0")
66

7-
addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.5.3")
87
addSbtPlugin("org.scala-js" % "sbt-scalajs" % scalaJSVersion)
98
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % crossVer)
109
addSbtPlugin("org.scala-native" % "sbt-scala-native" % scalaNativeVersion)

0 commit comments

Comments
 (0)