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

Adding Scala 2.13 support #681

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from
Open
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
5 changes: 5 additions & 0 deletions .jvmopts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-Xmx4g
-XX:MaxMetaspaceSize=512m
-XX:ReservedCodeCacheSize=256m
-XX:+UseParallelGC
-Dfile.encoding=UTF8
5 changes: 1 addition & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
language: scala

scala:
- 2.12.2

jdk: oraclejdk8

sudo: false
Expand All @@ -17,7 +14,7 @@ cache:
- $HOME/.sbt/boot/

script:
- sbt +clean +coverage +testAll +coverageReport +coverageAggregate
- sbt +clean +coverage +testAll +coverageAggregate

before_cache:
- find $HOME/.ivy2/cache -name "ivydata-*.properties" -print -delete
Expand Down
57 changes: 24 additions & 33 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,45 +4,39 @@ import com.lightbend.paradox.sbt.ParadoxPlugin
import com.lightbend.paradox.sbt.ParadoxPlugin.autoImport._
import ProjectImplicits._

val AkkaVersion = "2.5.6"
val ScalatestVersion = "3.0.1"
val AkkaVersion = "2.5.23"
val ScalatestVersion = "3.0.8"

val MIMAPreviousVersions = Seq("0.9.1")
val MIMAPreviousVersions = Seq("0.11.1-RC1")

lazy val testAll = TaskKey[Unit]("test-all")

lazy val GeneralSettings = Seq[Setting[_]](
compile := (compile in Compile).dependsOn(compile in Test).dependsOn(compile in IntegrationTest).value,
testAll := (test in Test).dependsOn(test in IntegrationTest).value,
organization := "com.tumblr",
scalaVersion := "2.12.2",
crossScalaVersions := Seq("2.11.8", "2.12.2"),
scalaVersion := "2.12.8",
crossScalaVersions := Seq("2.11.12", "2.12.8"),
apiURL := Some(url("https://www.javadoc.io/doc/")),
parallelExecution in Test := false,
scalacOptions := scalaVersion.map { v: String =>
val default = List(
"-feature",
"-language:implicitConversions",
"-language:postfixOps",
"-unchecked",
"-deprecation",
"-target:jvm-1.8"
)
if (v.startsWith("2.10.")) {
default
} else {
"-Ywarn-unused-import" :: default
}
}.value,
scalacOptions := Seq(
"-feature",
"-language:implicitConversions",
"-language:postfixOps",
"-unchecked",
"-deprecation",
"-target:jvm-1.8",
"-Ywarn-unused-import"
),
javacOptions ++= Seq("-source", "1.8", "-target", "1.8", "-Xlint"),
scalacOptions in (Compile, console) := Seq(),
libraryDependencies ++= Seq(
"com.typesafe.akka" %% "akka-actor" % AkkaVersion,
"com.typesafe.akka" %% "akka-testkit" % AkkaVersion % "test",
"org.scalatest" %% "scalatest" % ScalatestVersion % "test, it",
"org.scalamock" %% "scalamock-scalatest-support" % "3.6.0" % "test",
"org.mockito" % "mockito-all" % "1.9.5" % "test",
"org.slf4j" % "slf4j-api" % "1.7.6"
"org.mockito" % "mockito-all" % "1.10.19" % "test",
"org.slf4j" % "slf4j-api" % "1.7.26"
),
coverageExcludedPackages := "colossus\\.examples\\..*;.*\\.testkit\\.*",
credentials += Credentials("Sonatype Nexus Repository Manager",
Expand Down Expand Up @@ -88,9 +82,9 @@ lazy val testkitDependencies = libraryDependencies ++= Seq(

lazy val ExamplesSettings = Seq(
libraryDependencies ++= Seq(
"org.json4s" %% "json4s-jackson" % "3.5.3",
"ch.qos.logback" % "logback-classic" % "1.2.2",
"com.fasterxml.jackson.module" %% "jackson-module-scala" % "2.9.2",
"org.json4s" %% "json4s-jackson" % "3.6.6",
"ch.qos.logback" % "logback-classic" % "1.2.3",
"com.fasterxml.jackson.module" %% "jackson-module-scala" % "2.9.9",
"org.mockito" % "mockito-all" % "1.10.19"
)
)
Expand All @@ -99,13 +93,12 @@ lazy val RootProject = Project(id = "colossus-root", base = file("."))
.settings(noPubSettings: _*)
.configs(IntegrationTest)
.dependsOn(ColossusProject)
.aggregate(ColossusProject, ColossusTestkitProject, ColossusMetricsProject, ColossusExamplesProject, ColossusDocs)
.aggregate(ColossusProject, ColossusTestsProject, ColossusTestkitProject, ColossusMetricsProject, ColossusExamplesProject, ColossusDocs)

lazy val ColossusProject: Project = Project(id = "colossus", base = file("colossus"))
.settings(ColossusSettings: _*)
.withMima(MIMAPreviousVersions : _*)
.configs(IntegrationTest)
.aggregate(ColossusTestsProject)
.dependsOn(ColossusMetricsProject)

lazy val ColossusExamplesProject = Project(id = "colossus-examples", base = file("colossus-examples"))
Expand Down Expand Up @@ -144,14 +137,12 @@ lazy val ColossusDocs = Project(id = "colossus-docs", base = file("colossus-docs
.configs(IntegrationTest)
.dependsOn(ColossusProject, ColossusTestkitProject)

lazy val ColossusTestsProject = Project(
id = "colossus-tests",
base = file("colossus-tests"),
dependencies = Seq(ColossusTestkitProject % "compile;test->test")
).settings(noPubSettings: _*)
lazy val ColossusTestsProject = Project(id = "colossus-tests", base = file("colossus-tests"))
.dependsOn(ColossusTestkitProject % "compile;test->test")
.settings(noPubSettings: _*)
.settings(
libraryDependencies ++= Seq(
"ch.qos.logback" % "logback-classic" % "1.2.2"
"ch.qos.logback" % "logback-classic" % "1.2.3"
)
).configs(IntegrationTest)

1 change: 1 addition & 0 deletions docs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
tags:
- 0.11.1-RC1
- 0.11.0
- 0.10.1
- 0.10.0
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=0.13.16
sbt.version=1.2.8
18 changes: 9 additions & 9 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.9.0")
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.9")

addSbtPlugin("io.spray" % "sbt-revolver" % "0.8.0")
addSbtPlugin("io.spray" % "sbt-revolver" % "0.9.1")

addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "0.6.0")
addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "1.0.0")

addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.1")

addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "1.1")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "2.3")

addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.5.0")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.0")

addSbtPlugin("com.lightbend.paradox" % "sbt-paradox" % "0.3.1")
addSbtPlugin("com.lightbend.paradox" % "sbt-paradox" % "0.5.3")

addSbtPlugin("com.lucidchart" % "sbt-scalafmt" % "1.10")
addSbtPlugin("com.lucidchart" % "sbt-scalafmt" % "1.16")

addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.1.18")
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.3.0")

resolvers += "sonatype-releases" at "https://oss.sonatype.org/content/repositories/releases/"