Skip to content

Commit 886f42e

Browse files
Piyush Narangjohnynek
Piyush Narang
authored andcommitted
Add support for Scala 2.12.0 (#258)
* Add support for Scala 2.12.0 * Update yml indent * Turn on coverage by default * Turn on scalaFmtTest again * Remove call to inThisBuild, enable coverage only for 2.11 * Use oraclejdk8 for scala 2.12.0 * Turn off mima for 2.12 as this is the first release
1 parent 469154b commit 886f42e

File tree

4 files changed

+20
-12
lines changed

4 files changed

+20
-12
lines changed

.travis.yml

+6-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@ sudo: false
33
matrix:
44
include:
55
- scala: 2.10.6
6-
script: ./sbt ++$TRAVIS_SCALA_VERSION clean scalafmtTest test mimaReportBinaryIssues
6+
script: ./sbt "+++$TRAVIS_SCALA_VERSION clean" "+++$TRAVIS_SCALA_VERSION scalafmtTest" "+++$TRAVIS_SCALA_VERSION test" "+++$TRAVIS_SCALA_VERSION mimaReportBinaryIssues"
77

88
- scala: 2.11.8
9-
script: ./sbt ++$TRAVIS_SCALA_VERSION clean scalafmtTest coverage test coverageReport mimaReportBinaryIssues
9+
script: ./sbt "+++$TRAVIS_SCALA_VERSION clean" "+++$TRAVIS_SCALA_VERSION scalafmtTest" "+++$TRAVIS_SCALA_VERSION test" "+++$TRAVIS_SCALA_VERSION coverageReport" "+++$TRAVIS_SCALA_VERSION mimaReportBinaryIssues"
10+
11+
- scala: 2.12.0
12+
jdk: oraclejdk8
13+
script: ./sbt "+++$TRAVIS_SCALA_VERSION clean" "+++$TRAVIS_SCALA_VERSION test"
1014
after_success:
1115
- bash <(curl -s https://codecov.io/bash)

build.sbt

+11-8
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@ import bijection._
77

88
val buildLevelSettings = Seq(
99
organization := "com.twitter",
10-
crossScalaVersions := Seq("2.10.6", "2.11.8"),
11-
scalaVersion := "2.11.8",
10+
crossScalaVersions := Seq("2.10.6", "2.11.8", "2.12.0"),
1211
javacOptions ++= Seq("-source", "1.6", "-target", "1.6"),
1312
javacOptions in doc := Seq("-source", "1.6"),
13+
scalaVersion := "2.11.8",
14+
coverageEnabled := (if (scalaVersion.value startsWith "2.11") true else false),
1415
scalacOptions ++= Seq(
1516
"-unchecked",
1617
"-deprecation",
@@ -66,7 +67,6 @@ val buildLevelSettings = Seq(
6667
)
6768
)
6869
)
69-
inThisBuild(buildLevelSettings)
7070

7171
val sharedSettings = Seq(
7272
// Publishing options:
@@ -140,8 +140,8 @@ lazy val bijection = {
140140
Project(
141141
id = "bijection",
142142
base = file("."),
143-
settings = sharedSettings
144-
).enablePlugins(DocGen, SbtOsgi)
143+
settings = buildLevelSettings ++ sharedSettings
144+
).enablePlugins(DocGen, SbtOsgi, CrossPerProjectPlugin)
145145
.settings(
146146
test := {},
147147
publish := {}, // skip publishing for this root project.
@@ -169,7 +169,7 @@ def module(name: String) = {
169169
val id = s"bijection-$name"
170170
Project(id = id, base = file(id))
171171
.enablePlugins(SbtOsgi)
172-
.settings(sharedSettings)
172+
.settings(buildLevelSettings ++ sharedSettings)
173173
.settings(
174174
mimaPreviousArtifacts := youngestForwardCompatible(name),
175175
mimaBinaryIssueFilters ++= ignoredABIProblems
@@ -244,6 +244,7 @@ lazy val bijectionGuava = {
244244

245245
lazy val bijectionScrooge = {
246246
module("scrooge").settings(
247+
crossScalaVersions := crossScalaVersions.value.filterNot(_.startsWith("2.12")),
247248
osgiExportAll("com.twitter.bijection.scrooge"),
248249
libraryDependencies ++= Seq(
249250
"org.apache.thrift" % "libthrift" % "0.6.1" exclude ("junit", "junit"),
@@ -269,6 +270,7 @@ lazy val bijectionJson = {
269270

270271
lazy val bijectionUtil = {
271272
module("util").settings(
273+
crossScalaVersions := crossScalaVersions.value.filterNot(_.startsWith("2.12")),
272274
osgiExportAll("com.twitter.bijection.twitter_util"),
273275
libraryDependencies += "com.twitter" %% "util-core" % "6.24.0"
274276
).dependsOn(
@@ -278,6 +280,7 @@ lazy val bijectionUtil = {
278280

279281
lazy val bijectionFinagleMySql = {
280282
module("finagle-mysql").settings(
283+
crossScalaVersions := crossScalaVersions.value.filterNot(_.startsWith("2.12")),
281284
osgiExportAll("com.twitter.bijection.finagle_mysql"),
282285
libraryDependencies ++= Seq(
283286
"com.twitter" %% "finagle-mysql" % "6.25.0",
@@ -347,8 +350,8 @@ lazy val bijectionJson4s = {
347350
osgiExportAll("com.twitter.bijection.json4s"),
348351
libraryDependencies ++= Seq(
349352
"org.scala-lang" % "scala-reflect" % scalaVersion.value,
350-
"org.json4s" %% "json4s-native" % "3.2.10",
351-
"org.json4s" %% "json4s-ext" % "3.2.10"
353+
"org.json4s" %% "json4s-native" % "3.5.0",
354+
"org.json4s" %% "json4s-ext" % "3.5.0"
352355
)
353356
).dependsOn(
354357
bijectionCore % "test->test;compile->compile"

project/plugins.sbt

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ resolvers ++= Seq(
33
)
44

55
addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.3")
6+
addSbtPlugin("com.eed3si9n" % "sbt-doge" % "0.1.5")
67
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0")
78
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.1.11")
89
addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.5.4")

sbt

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
# Author: Paul Phillips <[email protected]>
55

66
# todo - make this dynamic
7-
declare -r sbt_release_version="0.13.12"
8-
declare -r sbt_unreleased_version="0.13.12"
7+
declare -r sbt_release_version="0.13.13"
8+
declare -r sbt_unreleased_version="0.13.13"
99
declare -r buildProps="project/build.properties"
1010

1111
declare sbt_jar sbt_dir sbt_create sbt_version

0 commit comments

Comments
 (0)