diff --git a/.travis.yml b/.travis.yml index 4e976ae2..e72acd22 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,8 +8,8 @@ scala: - 2.11.12 - 2.12.13 - 2.13.5 - - 3.0.0-M3 - 3.0.0-RC1 + - 3.0.0-RC2 env: - SCALAJS_VERSION= ADOPTOPENJDK=8 @@ -39,16 +39,16 @@ matrix: # Scala Native doesn't support Scala 3 yet - - scala: 3.0.0-M3 + - scala: 3.0.0-RC1 env: SCALANATIVE_VERSION=0.4.0 ADOPTOPENJDK=8 - - scala: 3.0.0-M3 + - scala: 3.0.0-RC1 env: SCALANATIVE_VERSION=0.4.0 ADOPTOPENJDK=11 - - scala: 3.0.0-RC1 + - scala: 3.0.0-RC2 env: SCALANATIVE_VERSION=0.4.0 ADOPTOPENJDK=8 - - scala: 3.0.0-RC1 + - scala: 3.0.0-RC2 env: SCALANATIVE_VERSION=0.4.0 ADOPTOPENJDK=11 install: diff --git a/build.sbt b/build.sbt index 1dc19691..8d33b41c 100644 --- a/build.sbt +++ b/build.sbt @@ -55,7 +55,7 @@ lazy val junit = libraryDependencies += "com.novocode" % "junit-interface" % "0. lazy val scala211 = "2.11.12" lazy val scala212 = "2.12.13" lazy val scala213 = "2.13.5" -lazy val scala30 = "3.0.0-RC1" +lazy val scala30 = "3.0.0-RC2" lazy val compat = MultiScalaCrossProject(JSPlatform, JVMPlatform, NativePlatform)( "compat", @@ -67,8 +67,12 @@ lazy val compat = MultiScalaCrossProject(JSPlatform, JVMPlatform, NativePlatform scalacOptions ++= Seq("-feature", "-language:higherKinds", "-language:implicitConversions"), Compile / unmanagedSourceDirectories += { val sharedSourceDir = (ThisBuild / baseDirectory).value / "compat/src/main" - if (scalaVersion.value.startsWith("2.13.") || isDotty.value) sharedSourceDir / "scala-2.13" - else sharedSourceDir / "scala-2.11_2.12" + CrossVersion.partialVersion(scalaVersion.value) match { + case Some((3, _) | (2, 13)) => + sharedSourceDir / "scala-2.13" + case _ => + sharedSourceDir / "scala-2.11_2.12" + } }, versionScheme := Some("early-semver"), versionPolicyIntention := Compatibility.BinaryCompatible, @@ -76,7 +80,10 @@ lazy val compat = MultiScalaCrossProject(JSPlatform, JVMPlatform, NativePlatform .jvmSettings( Test / unmanagedSourceDirectories += (ThisBuild / baseDirectory).value / "compat/src/test/scala-jvm", junit, - scalaModuleMimaPreviousVersion := Some("2.4.0").filterNot(_ => isDotty.value), + scalaModuleMimaPreviousVersion := (CrossVersion.partialVersion(scalaVersion.value) match { + case Some((3, _)) => None + case _ => Some("2.4.0") + }), mimaBinaryIssueFilters ++= { import com.typesafe.tools.mima.core._ import com.typesafe.tools.mima.core.ProblemFilters._ @@ -92,7 +99,10 @@ lazy val compat = MultiScalaCrossProject(JSPlatform, JVMPlatform, NativePlatform .Process("git rev-parse HEAD") .lineStream_! .head - val opt = if (isDotty.value) "-scalajs-mapSourceURI" else "-P:scalajs:mapSourceURI" + val opt = CrossVersion.partialVersion(scalaVersion.value) match { + case Some((3, _)) => "-scalajs-mapSourceURI" + case _ => "-P:scalajs:mapSourceURI" + } Seq(s"$opt:$x->$y/") }, Test / fork := false // Scala.js cannot run forked tests @@ -277,8 +287,8 @@ lazy val `scalafix-tests` = project output212Plus.value, output213.value ), - scalafixTestkitInputSourceDirectories := sourceDirectories.in(`scalafix-input`, Compile).value, - scalafixTestkitInputClasspath := fullClasspath.in(`scalafix-input`, Compile).value + scalafixTestkitInputSourceDirectories := (`scalafix-input` / Compile / sourceDirectories).value, + scalafixTestkitInputClasspath := (`scalafix-input` / Compile / fullClasspath).value, ) .dependsOn(`scalafix-input`, `scalafix-rules`) .enablePlugins(BuildInfoPlugin, ScalafixTestkitPlugin) diff --git a/project/build.properties b/project/build.properties index dbae93bc..af4ff6f2 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.4.9 +sbt.version=1.5.0-RC2 diff --git a/project/plugins.sbt b/project/plugins.sbt index 2eb99a12..a755b6aa 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -4,7 +4,6 @@ val scalaJSVersion = val scalaNativeVersion = Option(System.getenv("SCALANATIVE_VERSION")).filter(_.nonEmpty).getOrElse("0.4.0") -addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.5.3") addSbtPlugin("org.scala-js" % "sbt-scalajs" % scalaJSVersion) addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % crossVer) addSbtPlugin("org.scala-native" % "sbt-scala-native" % scalaNativeVersion)