Skip to content

Commit

Permalink
Scala 2.13.0-RC1 support (#254)
Browse files Browse the repository at this point in the history
(cherry picked from commit 4a1eda6)
(cherry picked from commit cb7da35)
  • Loading branch information
marcospereira authored and dwijnand committed Apr 8, 2019
1 parent f58b540 commit ddcb396
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ matrix:
scala:
- 2.12.8
- 2.11.12
- 2.13.0-M3
- 2.13.0-RC1

script:
- sbt -DscalaJSStage=full ++$TRAVIS_SCALA_VERSION validateCode testOnly mimaReportBinaryIssues
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ dependencyClasspath in Jmh := (dependencyClasspath in Test).value
// rewire tasks, so that 'jmh:run' automatically invokes 'jmh:compile' (otherwise a clean 'jmh:run' would fail)
compile in Jmh := (compile in Jmh).dependsOn(compile in Test).value

run in Jmh := (run in Jmh).dependsOn(Keys.compile in Jmh).value
run in Jmh := (run in Jmh).dependsOn(Keys.compile in Jmh).evaluated
23 changes: 13 additions & 10 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import com.typesafe.tools.mima.plugin.MimaPlugin.mimaDefaultSettings
import com.typesafe.tools.mima.plugin.MimaKeys.{
mimaBinaryIssueFilters, mimaPreviousArtifacts
}
import sbtcrossproject.{crossProject, CrossType}

resolvers ++= DefaultOptions.resolvers(snapshot = true)

Expand All @@ -18,7 +19,7 @@ val scala213Version = "2.13.0-M3"
val specsBuild = Def.setting[Seq[ModuleID]] {
val specsVersion = CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, 10)) => "3.9.1"
case _ => "4.0.2"
case _ => "4.5.1"
}

Seq("org.specs2" %% "specs2-core" % specsVersion)
Expand Down Expand Up @@ -76,9 +77,7 @@ lazy val commonSettings = scalariformSettings(autoformat = true) ++ Seq(
))
},
scalaVersion := ScalaVersions.scala212,
crossScalaVersions := Seq(
ScalaVersions.scala210, ScalaVersions.scala211, ScalaVersions.scala212, scala213Version
),
crossScalaVersions := Seq("2.11.12", ScalaVersions.scala212, scala213Version),
ScalariformKeys.preferences := ScalariformKeys.preferences.value
.setPreference(SpacesAroundMultiImports, true)
.setPreference(SpaceInsideParentheses, false)
Expand All @@ -98,7 +97,7 @@ lazy val root = project
`play-json-joda`
).settings(commonSettings: _*)

lazy val `play-json` = crossProject.crossType(CrossType.Full)
lazy val `play-json` = crossProject(JSPlatform, JVMPlatform).crossType(CrossType.Full)
.in(file("play-json"))
.enablePlugins(PlayLibrary, Playdoc)
.settings(commonSettings)
Expand All @@ -120,13 +119,17 @@ lazy val `play-json` = crossProject.crossType(CrossType.Full)
ProblemFilters.exclude[ReversedMissingMethodProblem]("play.api.libs.json.DefaultReads.BigIntegerReads")
),
libraryDependencies ++= jsonDependencies(scalaVersion.value) ++ Seq(
"org.scalatest" %%% "scalatest" % "3.0.5-M1" % Test,
"org.scalacheck" %%% "scalacheck" % "1.13.5" % Test,
"org.scalatest" %%% "scalatest" % "3.0.8-RC2" % Test,
"org.scalacheck" %%% "scalacheck" % "1.14.0" % Test,
"com.chuusai" %% "shapeless" % "2.3.3" % Test,
"org.typelevel" %% "macro-compat" % "1.1.1",
"org.scala-lang" % "scala-compiler" % scalaVersion.value % "provided",
compilerPlugin("org.scalamacros" % "paradise" % "2.1.0" cross CrossVersion.full)
"org.scala-lang" % "scala-compiler" % scalaVersion.value % "provided"
),
libraryDependencies ++=
(CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, 13)) => Seq()
case _ => Seq(compilerPlugin("org.scalamacros" % "paradise" % "2.1.0" cross CrossVersion.full))
}),
sourceGenerators in Compile += Def.task{
val dir = (sourceManaged in Compile).value

Expand Down Expand Up @@ -194,7 +197,7 @@ lazy val `play-jsonJVM` = `play-json`.jvm.

lazy val `play-jsonJS` = `play-json`.js

lazy val `play-functional` = crossProject.crossType(CrossType.Pure)
lazy val `play-functional` = crossProject(JSPlatform, JVMPlatform).crossType(CrossType.Pure)
.in(file("play-functional"))
.settings(commonSettings)
.settings(playJsonMimaSettings)
Expand Down
6 changes: 4 additions & 2 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
resolvers ++= DefaultOptions.resolvers(snapshot = true)
resolvers += Resolver.typesafeRepo("releases")

addSbtPlugin("com.typesafe.play" % "interplay" % sys.props.get("interplay.version").getOrElse("1.3.18"))
addSbtPlugin("com.typesafe.play" % "interplay" % sys.props.get("interplay.version").getOrElse("2.0.6"))

addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.2.24")

Expand All @@ -18,4 +18,6 @@ addSbtPlugin("org.scalariform" % "sbt-scalariform" % "1.8.0")

addSbtPlugin("de.heikoseeberger" % "sbt-header" % "3.0.1")

addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.26")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.27")

addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "0.6.0")

0 comments on commit ddcb396

Please sign in to comment.