Skip to content
Permalink
Browse files

Build on Scala 2.13

  • Loading branch information...
liff committed Jun 13, 2019
1 parent c7d4ad8 commit d8587e6161be7324709ffa1a4fcd2870899efbfd
Showing with 25 additions and 20 deletions.
  1. +1 −1 .travis.yml
  2. +22 −17 build.sbt
  3. +2 −2 src/main/scala/akka/stream/contrib/AccumulateWhileUnchanged.scala
@@ -1,5 +1,5 @@
language: scala
jdk: oraclejdk8
jdk: openjdk8

script:
- sbt -jvm-opts .jvmopts "$CMD"
@@ -1,19 +1,19 @@
organization := "com.typesafe.akka"
name := "akka-stream-contrib"

crossScalaVersions := Seq("2.12.8", "2.11.12")
crossScalaVersions := Seq("2.13.0", "2.12.8", "2.11.12")
scalaVersion := crossScalaVersions.value.head

val AkkaVersion = "2.5.21"
val AkkaVersion = "2.5.23"

libraryDependencies ++= Seq(
"com.typesafe.akka" %% "akka-stream" % AkkaVersion,
"com.typesafe.akka" %% "akka-stream-testkit" % AkkaVersion % Test,
"junit" % "junit" % "4.12" % Test, // Common Public License 1.0
"com.novocode" % "junit-interface" % "0.11" % Test, // BSD-like
"com.google.jimfs" % "jimfs" % "1.1" % Test, // ApacheV2
"org.scalatest" %% "scalatest" % "3.0.6" % Test, // ApacheV2
"com.miguno.akka" %% "akka-mock-scheduler" % "0.5.4" % Test // ApacheV2
"org.scalatest" %% "scalatest" % "3.0.8" % Test, // ApacheV2
"com.miguno.akka" %% "akka-mock-scheduler" % "0.5.5" % Test // ApacheV2
)

organizationName := "Lightbend Inc."
@@ -36,19 +36,24 @@ pgpPublicRing := file("ci-keys/pubring.asc")
pgpSecretRing := file("ci-keys/secring.asc")
pgpPassphrase := sys.env.get("PGP_PASS").map(_.toCharArray)

scalacOptions ++= Seq(
"-encoding",
"UTF-8",
"-feature",
"-unchecked",
"-deprecation",
//"-Xfatal-warnings",
"-Xlint",
"-Yno-adapted-args",
"-Ywarn-dead-code",
"-Ywarn-numeric-widen",
"-Xfuture"
)
scalacOptions ++=
Seq("-encoding", "UTF-8", "-feature", "-unchecked", "-deprecation", "-Xlint") ++ (
if (scalaVersion.value startsWith "2.13.")
Seq(
"-Wdead-code",
"-Wnumeric-widen",
"-Xsource:2.14"
)
else
Seq(
//"-Xfatal-warnings",
"-Xlint",
"-Yno-adapted-args",
"-Ywarn-dead-code",
"-Ywarn-numeric-widen",
"-Xfuture"
)
)

// By default scalatest futures time out in 150 ms, dilate that to 600ms.
// This should not impact the total test time as we don't expect to hit this
@@ -113,7 +113,7 @@ final class AccumulateWhileUnchanged[Element, Property](propertyExtractor: Eleme
super.preStart()
maxDuration match {
case Some(max) => schedulePeriodically(None, max)
case None => Unit
case None => ()
}
}
override def postStop(): Unit =
@@ -137,7 +137,7 @@ final class AccumulateWhileUnchanged[Element, Property](propertyExtractor: Eleme
case Some(next) =>
buffer += next
nbElements += 1
case None => Unit
case None => ()
}

currentState = nextState

0 comments on commit d8587e6

Please sign in to comment.
You can’t perform that action at this time.