Skip to content

Commit

Permalink
Scala 2.13.0 (#596)
Browse files Browse the repository at this point in the history
  • Loading branch information
xuwei-k authored and thesamet committed Jun 13, 2019
1 parent d9c1786 commit 34993f9
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ stages:
scala:
- 2.11.12
- 2.12.8
- 2.13.0-RC1
- 2.13.0

env:
- TEST_SCRIPT=e2e.sh E2E_SHADED=0
Expand Down
34 changes: 27 additions & 7 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ val Scala211 = "2.11.12"

val Scala212 = "2.12.8"

val Scala213 = "2.13.0-RC1"
val Scala213 = "2.13.0"

val protobufVersion = "3.8.0"

Expand All @@ -22,7 +22,27 @@ val MimaPreviousVersion = "0.9.0-M2"

val ProtocJar = "com.github.os72" % "protoc-jar" % "3.8.0"

val ScalaTest = "org.scalatest" %% "scalatest" % "3.0.8-RC3"
val ScalaTest = "org.scalatest" %% "scalatest" % "3.0.8"

val utestVersion = Def.setting(
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, v)) if v <= 11 =>
// drop Scala 2.11 support since 0.6.9
"0.6.8"
case _ =>
"0.6.9"
}
)

val fastparseVersion = Def.setting(
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, v)) if v <= 11 =>
// drop Scala 2.11 support since 2.1.3
"2.1.2"
case _ =>
"2.1.3"
}
)

scalaVersion in ThisBuild := Scala212

Expand Down Expand Up @@ -102,8 +122,8 @@ lazy val runtime = crossProject(JSPlatform, JVMPlatform/*, NativePlatform*/)
.settings(
name := "scalapb-runtime",
libraryDependencies ++= Seq(
"com.lihaoyi" %%% "fastparse" % "2.1.2",
"com.lihaoyi" %%% "utest" % "0.6.7" % "test",
"com.lihaoyi" %%% "fastparse" % fastparseVersion.value,
"com.lihaoyi" %%% "utest" % utestVersion.value % "test",
"commons-codec" % "commons-codec" % "1.12" % "test",
"com.google.protobuf" % "protobuf-java-util" % protobufVersion % "test",
),
Expand All @@ -128,7 +148,7 @@ lazy val runtime = crossProject(JSPlatform, JVMPlatform/*, NativePlatform*/)
.dependsOn(lenses)
.platformsSettings(JSPlatform/*, NativePlatform*/)(
libraryDependencies ++= Seq(
"com.thesamet.scalapb" %%% "protobuf-runtime-scala" % "0.8.1"
"com.thesamet.scalapb" %%% "protobuf-runtime-scala" % "0.8.2"
),
(unmanagedSourceDirectories in Compile) += baseDirectory.value / ".." / "non-jvm" / "src" / "main" / "scala"
)
Expand Down Expand Up @@ -207,7 +227,7 @@ lazy val compilerPlugin = project.in(file("compiler-plugin"))
Seq(dest)
}.taskValue,
libraryDependencies ++= Seq(
"com.thesamet.scalapb" %% "protoc-bridge" % "0.7.6",
"com.thesamet.scalapb" %% "protoc-bridge" % "0.7.7",
"com.google.protobuf" % "protobuf-java" % protobufVersion,
ScalaTest % "test",
ProtocJar % "test",
Expand Down Expand Up @@ -382,7 +402,7 @@ lazy val lenses = crossProject(JSPlatform, JVMPlatform/*, NativePlatform*/).in(f
},
testFrameworks += new TestFramework("utest.runner.Framework"),
libraryDependencies ++= Seq(
"com.lihaoyi" %%% "utest" % "0.6.7" % "test"
"com.lihaoyi" %%% "utest" % utestVersion.value % "test"
),
mimaPreviousArtifacts := Set("com.thesamet.scalapb" %% "lenses" % MimaPreviousVersion),
mimaBinaryIssueFilters ++= {
Expand Down
4 changes: 2 additions & 2 deletions e2e/build.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import scalapb.compiler.Version.grpcJavaVersion

crossScalaVersions in ThisBuild := Seq("2.11.12", "2.12.8", "2.13.0-RC1")
crossScalaVersions in ThisBuild := Seq("2.11.12", "2.12.8", "2.13.0")

scalaVersion in ThisBuild := "2.12.8"

Expand Down Expand Up @@ -44,7 +44,7 @@ val commonSettings = Seq(
}
},
libraryDependencies ++= Seq(
"org.scalatest" %% "scalatest" % "3.0.8-RC3" % "test",
"org.scalatest" %% "scalatest" % "3.0.8" % "test",
"io.grpc" % "grpc-netty" % grpcJavaVersion, //netty transport of grpc
"io.grpc" % "grpc-protobuf" % grpcJavaVersion, //protobuf message encoding for java implementation
"io.grpc" % "grpc-services" % grpcJavaVersion,
Expand Down
2 changes: 1 addition & 1 deletion mima.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -e
SCALA_VERSION=${SCALA_VERSION:-${TRAVIS_SCALA_VERSION:-2.11.11}}

if [ "$SCALA_VERSION" != "2.13.0-RC1" ]
if [ "$SCALA_VERSION" != "2.13.0" ]
then sbt ++$SCALA_VERSION \
grpcRuntime/mimaReportBinaryIssues \
lensesJVM/mimaReportBinaryIssues \
Expand Down

0 comments on commit 34993f9

Please sign in to comment.