Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates - Scala 2.13 & Akka 2.6.0-M3 (bp #354) #356

Merged
merged 1 commit into from
Jun 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ env:

scala:
- 2.12.8
- 2.13.0-RC2
- 2.13.0

script:
- sbt ++$TRAVIS_SCALA_VERSION 'testOnly -- xonly timefactor 5' mimaReportBinaryIssues validateCode doc
Expand Down
9 changes: 4 additions & 5 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import scalariform.formatter.preferences._
//---------------------------------------------------------------

val scala212 = "2.12.8"
val scala213 = "2.13.0-RC2"
val scala213 = "2.13.0"

resolvers ++= DefaultOptions.resolvers(snapshot = true)
resolvers in ThisBuild += Resolver.sonatypeRepo("public")
Expand Down Expand Up @@ -45,13 +45,12 @@ lazy val mimaSettings = mimaDefaultSettings ++ Seq(
mimaPreviousArtifacts := {
val VersionPattern = """^(\d+).(\d+).(\d+)(-.*)?""".r
val previousVersions = version.value match {
case VersionPattern("2", "0", "5", _) if scalaBinaryVersion.value == "2.13" => Set.empty // added 2.13.0 support in 2.0.5-SNAPSHOT.
case VersionPattern(epoch, major, minor, _) => (0 until minor.toInt).map(v => s"$epoch.$major.$v")
case _ => sys.error(s"Cannot find previous versions for ${version.value}")
}

val sbv = scalaBinaryVersion.value
if (sbv.equals(scala213)) Set.empty
else previousVersions.toSet.map(previousVersion => organization.value %% name.value % previousVersion)
previousVersions.toSet.map(previousVersion => organization.value %% name.value % previousVersion)
},
mimaBinaryIssueFilters ++= Seq(
ProblemFilters.exclude[MissingTypesProblem]("play.api.libs.ws.ahc.AhcWSClientConfig$"),
Expand Down Expand Up @@ -385,7 +384,7 @@ lazy val `integration-tests` = project.in(file("integration-tests"))
fork in Test := true,
concurrentRestrictions += Tags.limitAll(1), // only one integration test at a time
testOptions in Test := Seq(Tests.Argument(TestFrameworks.JUnit, "-a", "-v")),
libraryDependencies ++= akkaHttp.value.map(_ % Test) ++ testDependencies
libraryDependencies ++= akkaHttp.map(_ % Test) ++ testDependencies
)
.settings(shadedAhcSettings)
.settings(shadedOAuthSettings)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ trait CurlFormat {
val encodedPassword = Base64.getUrlEncoder.encodeToString(s"$userName:$password".getBytes(StandardCharsets.US_ASCII))
b.append(s""" --header 'Authorization: Basic ${quote(encodedPassword)}'""")
b.append(" \\\n")
case _ =>
case _ => ()
}

// headers
Expand Down
13 changes: 4 additions & 9 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ object Dependencies {

val scalaJava8Compat = Seq("org.scala-lang.modules" %% "scala-java8-compat" % "0.9.0")

val playJsonVersion = "2.8.0-M1"
val playJsonVersion = "2.8.0-M3"
val playJson = Seq("com.typesafe.play" %% "play-json" % playJsonVersion)

val slf4jApi = Seq("org.slf4j" % "slf4j-api" % "1.7.26")
Expand All @@ -40,20 +40,15 @@ object Dependencies {
val signpostVersion = "1.2.1.2"
val oauth = Seq("oauth.signpost" % "signpost-core" % signpostVersion)

val cachecontrolVersion = "2.0.0-M1"
val cachecontrolVersion = "2.0.0-M2"
val cachecontrol = Seq("com.typesafe.play" %% "cachecontrol" % cachecontrolVersion)

val asyncHttpClientVersion = "2.10.0"
val asyncHttpClient = Seq("org.asynchttpclient" % "async-http-client" % asyncHttpClientVersion)

val akkaVersion = "2.6.0-M2"
val akkaVersion = "2.6.0-M3"
Copy link
Contributor

@octonato octonato Jun 17, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in order to have Scala 2.13 support, we must bump the Akka version as well.
Akka 2.6.0-M2 has no binaries for Scala 2.13

val akkaStreams = Seq("com.typesafe.akka" %% "akka-stream" % akkaVersion)

val akkaHttpVersion = Def.setting(CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, 13)) => "10.1.8+26-f33ec39a"
case _ => "10.1.8"
})
val akkaHttp = Def.setting(Seq("com.typesafe.akka" %% "akka-http" % akkaHttpVersion.value))
val akkaHttp = Seq("com.typesafe.akka" %% "akka-http" % "10.1.8")

val reactiveStreams = Seq("org.reactivestreams" % "reactive-streams" % "1.0.2")

Expand Down