From 196c181bb57fe88958b8158f2dca16363e7b907f Mon Sep 17 00:00:00 2001 From: Seth Tisue Date: Mon, 29 Mar 2021 11:13:28 -0700 Subject: [PATCH] Scala 3.0.0-RC2, sbt 1.5, JDK 16 --- .travis.yml | 3 ++- build.sbt | 30 ++++++++++++++++-------------- project/build.properties | 2 +- project/plugins.sbt | 1 - 4 files changed, 19 insertions(+), 17 deletions(-) diff --git a/.travis.yml b/.travis.yml index 62fa2972..6fb39881 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,13 +5,14 @@ import: scala/scala-dev:travis/default.yml language: scala scala: - - 3.0.0-M3 + - 3.0.0-RC2 - 3.0.0-RC1 - 2.13.5 env: - ADOPTOPENJDK=8 - ADOPTOPENJDK=11 + - ADOPTOPENJDK=16 install: - git fetch --tags # get all tags for sbt-dynver diff --git a/build.sbt b/build.sbt index ace60ee8..fad6bb0c 100644 --- a/build.sbt +++ b/build.sbt @@ -6,20 +6,24 @@ ThisBuild / versionPolicyIntention := Compatibility.BinaryAndSourceCompatible lazy val commonSettings: Seq[Setting[_]] = ScalaModulePlugin.scalaModuleSettings ++ Seq( - Compile / compile / scalacOptions --= (if (isDotty.value) Seq("-Xlint") - else Seq()), - Compile / compile / scalacOptions ++= (if (isDotty.value) Seq() - else Seq("-Werror")), + Compile / compile / scalacOptions --= (CrossVersion.partialVersion(scalaVersion.value) match { + case Some((3, _)) => Seq("-Xlint") + case _ => Seq() + }), + Compile / compile / scalacOptions ++= (CrossVersion.partialVersion(scalaVersion.value) match { + case Some((3, _)) => Seq() + case _ => Seq("-Werror"), + }), ) lazy val core = project.in(file("core")) .settings(commonSettings) .settings( name := "scala-parallel-collections", - // don't run Dottydoc, it errors and isn't needed anyway. - // but we leave `publishArtifact` set to true, otherwise Sonatype won't let us publish - Compile / doc / sources := (if (isDotty.value) Seq() else (Compile / doc/ sources).value), - scalaModuleMimaPreviousVersion := Some("1.0.0").filterNot(_ => isDotty.value), + scalaModuleMimaPreviousVersion := (CrossVersion.partialVersion(scalaVersion.value) match { + case Some((3, _)) => None + case _ => Some("1.0.0") + }), ) lazy val junit = project.in(file("junit")) @@ -46,11 +50,9 @@ lazy val scalacheck = project.in(file("scalacheck")) lazy val testmacros = project.in(file("testmacros")) .settings(commonSettings) .settings( - libraryDependencies += ( - if (isDotty.value) - scalaOrganization.value %% "scala3-compiler" % scalaVersion.value - else - scalaOrganization.value % "scala-compiler" % scalaVersion.value - ), + libraryDependencies += (CrossVersion.partialVersion(scalaVersion.value) match { + case Some((3, _)) => scalaOrganization.value %% "scala3-compiler" % scalaVersion.value + case _ => scalaOrganization.value % "scala-compiler" % scalaVersion.value + }), publish / skip := true, ) 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 e47c7d18..32698b24 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,3 +1,2 @@ addSbtPlugin("org.scala-lang.modules" % "sbt-scala-module" % "2.2.4") addSbtPlugin("ch.epfl.scala" % "sbt-version-policy" % "1.0.0-RC5") -addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.5.3")