From fee33a909ecd8908e8c0f9ee36b0e0b456d01774 Mon Sep 17 00:00:00 2001 From: Fabian Grutsch Date: Fri, 21 Jun 2019 19:11:15 +0200 Subject: [PATCH] #49 add scala 2.13.0 support --- .gitignore | 4 ++++ .travis.yml | 1 + build.sbt | 19 ++++++++++++++----- project/Dependencies.scala | 8 ++++---- 4 files changed, 23 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 8eb053a..6e3c4ca 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,7 @@ project/plugins/project/ .worksheet .idea + +# scala metals specific +.metals +.bloop \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 8923271..fcefa3f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,7 @@ language: scala scala: - 2.11.12 - 2.12.8 +- 2.13.0 script: - sbt "++ $TRAVIS_SCALA_VERSION test" sudo: false diff --git a/build.sbt b/build.sbt index 9a3021d..8a67bb5 100644 --- a/build.sbt +++ b/build.sbt @@ -13,16 +13,25 @@ scalacOptions in ThisBuild := { "-feature", // warning and location for usages of features that should be imported explicitly "-unchecked", // additional warnings where generated code depends on assumptions "-Xlint", // recommended additional warnings - "-Ywarn-adapted-args", // Warn if an argument list is modified to match the receiver "-Ywarn-value-discard", // Warn when non-Unit expression results are unused - "-Ywarn-inaccessible", // "-Ywarn-dead-code", // "-Xfatal-warnings", "-language:reflectiveCalls", "-Ydelambdafy:method" ) - if (scalaVersion.value.startsWith("2.11")) commonOptions ++ Seq("-Ybackend:GenBCode") - else commonOptions + + scalaVersion.value match { + case v: String if v startsWith "2.13" => Seq() + case v: String if v startsWith "2.12" => Seq( + "-Ywarn-adapted-args", // Warn if an argument list is modified to match the receiver, + "-Ywarn-inaccessible" + ) + case v: String if v startsWith "2.11" => Seq( + "-Ywarn-adapted-args", // Warn if an argument list is modified to match the receiver + "-Ywarn-inaccessible", + "-Ybackend:GenBCode" + ) + } } lazy val akkaPersistencePgModule = { @@ -59,7 +68,7 @@ lazy val benchmarkModule = { .configs(GatlingIt) .settings(Defaults.coreDefaultSettings ++ commonSettings ++ Seq(skip in publish := true)) - .settings(crossScalaVersions := (crossScalaVersions in ThisBuild).value.filter(_ startsWith "2.12")) + .settings(crossScalaVersions := (crossScalaVersions in ThisBuild).value.filter(_ startsWith "2.13")) .settings(scalaVersion := crossScalaVersions.value.last) diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 74499aa..64bf8f3 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -2,8 +2,8 @@ import sbt._ object Dependencies { - val akkaVersion = "2.5.22" - val slickVersion = "3.3.0" + val akkaVersion = "2.5.23" + val slickVersion = "3.3.2" val gatlingVersion = "2.2.4" val scalaJava8Compat = "org.scala-lang.modules" %% "scala-java8-compat" % "0.9.0" @@ -18,7 +18,7 @@ object Dependencies { val slickHikariCp = "com.typesafe.slick" %% "slick-hikaricp" % slickVersion // Test dependencies - val scalaTest = "org.scalatest" %% "scalatest" % "3.0.7" % "test,it" + val scalaTest = "org.scalatest" %% "scalatest" % "3.0.8" % "test,it" val akkaTest = "com.typesafe.akka" %% "akka-testkit" % akkaVersion % "test,it" val akkaPersistenceTestkit = "com.typesafe.akka" %% "akka-persistence-tck" % akkaVersion % "test,it" val slf4jSimple = "org.slf4j" % "slf4j-simple" % "1.7.26" % "test,it" @@ -28,7 +28,7 @@ object Dependencies { val gatlinHighcharts = "io.gatling.highcharts" % "gatling-charts-highcharts" % gatlingVersion val gatling = "io.gatling" % "gatling-test-framework" % gatlingVersion - val postgres = "org.postgresql" % "postgresql" % "42.2.5" + val postgres = "org.postgresql" % "postgresql" % "42.2.6" val mainTestDependencies = Seq ( scalaTest, akkaSlf4j, tyrex