From 7f11fce165a418a393e1e532a3638786b3eb1d55 Mon Sep 17 00:00:00 2001 From: Marcos Pereira Date: Fri, 3 Nov 2017 17:52:18 -0400 Subject: [PATCH] Support Scala 2.13.0-M2 (#115) * Support Scala 2.13.0-M2 * Small refactoring when adding specs2 dependency --- .travis.yml | 1 + build.sbt | 20 ++++++++++++-------- project/plugins.sbt | 2 +- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index f351cb22b..4d0eb5d79 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,6 @@ language: scala scala: +- 2.13.0-M2 - 2.12.4 - 2.11.11 - 2.10.6 diff --git a/build.sbt b/build.sbt index 28ab66dda..cc0b7626d 100644 --- a/build.sbt +++ b/build.sbt @@ -13,12 +13,16 @@ import com.typesafe.tools.mima.plugin.MimaKeys.{ resolvers ++= DefaultOptions.resolvers(snapshot = true) -val scala213Version = "2.13.0-M1" +val scala213Version = "2.13.0-M2" -val specsVersion = "3.9.1" -val specsBuild = Seq( - "specs2-core" -).map("org.specs2" %% _ % specsVersion) +val specsBuild = Def.setting[Seq[ModuleID]] { + val specsVersion = CrossVersion.partialVersion(scalaVersion.value) match { + case Some((2, 10)) => "3.9.1" + case _ => "4.0.1" + } + + Seq("org.specs2" %% "specs2-core" % specsVersion) +} val jacksonVersion = "2.9.1" val jacksons = Seq( @@ -104,7 +108,7 @@ lazy val `play-json` = crossProject.crossType(CrossType.Full) ProblemFilters.exclude[MissingTypesProblem]("play.api.libs.json.JsObject$") ), libraryDependencies ++= jsonDependencies(scalaVersion.value) ++ Seq( - "org.scalatest" %%% "scalatest" % "3.0.3" % Test, + "org.scalatest" %%% "scalatest" % "3.0.4" % Test, "org.scalacheck" %%% "scalacheck" % "1.13.5" % Test, "com.chuusai" %% "shapeless" % "2.3.2" % Test, "org.typelevel" %% "macro-compat" % "1.1.1", @@ -162,7 +166,7 @@ lazy val `play-json-joda` = project .enablePlugins(PlayLibrary) .settings(commonSettings) .settings( - libraryDependencies ++= joda ++ specsBuild.map(_ % Test) + libraryDependencies ++= joda ++ specsBuild.value.map(_ % Test) ) .dependsOn(`play-jsonJVM`) @@ -170,7 +174,7 @@ lazy val `play-jsonJVM` = `play-json`.jvm. settings( libraryDependencies ++= joda ++ // TODO: remove joda after 2.6.0 - jacksons ++ specsBuild.map(_ % Test) :+ ( + jacksons ++ specsBuild.value.map(_ % Test) :+ ( "ch.qos.logback" % "logback-classic" % "1.2.3" % Test ), unmanagedSourceDirectories in Test ++= (baseDirectory.value / ".." / ".." / "docs" / "manual" / "working" / "scalaGuide" ** "code").get diff --git a/project/plugins.sbt b/project/plugins.sbt index a06a36832..e7eca78c9 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -18,4 +18,4 @@ addSbtPlugin("org.scalariform" % "sbt-scalariform" % "1.8.0") addSbtPlugin("de.heikoseeberger" % "sbt-header" % "3.0.1") -addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.19") +addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.20")