Skip to content

Commit

Permalink
Add support for Scala 2.12.0 (#258)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Piyush Narang authored and johnynek committed Nov 30, 2016
1 parent 469154b commit 886f42e
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 12 deletions.
8 changes: 6 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@ sudo: false
matrix:
include:
- scala: 2.10.6
script: ./sbt ++$TRAVIS_SCALA_VERSION clean scalafmtTest test mimaReportBinaryIssues
script: ./sbt "+++$TRAVIS_SCALA_VERSION clean" "+++$TRAVIS_SCALA_VERSION scalafmtTest" "+++$TRAVIS_SCALA_VERSION test" "+++$TRAVIS_SCALA_VERSION mimaReportBinaryIssues"

- scala: 2.11.8
script: ./sbt ++$TRAVIS_SCALA_VERSION clean scalafmtTest coverage test coverageReport mimaReportBinaryIssues
script: ./sbt "+++$TRAVIS_SCALA_VERSION clean" "+++$TRAVIS_SCALA_VERSION scalafmtTest" "+++$TRAVIS_SCALA_VERSION test" "+++$TRAVIS_SCALA_VERSION coverageReport" "+++$TRAVIS_SCALA_VERSION mimaReportBinaryIssues"

- scala: 2.12.0
jdk: oraclejdk8
script: ./sbt "+++$TRAVIS_SCALA_VERSION clean" "+++$TRAVIS_SCALA_VERSION test"
after_success:
- bash <(curl -s https://codecov.io/bash)
19 changes: 11 additions & 8 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ import bijection._

val buildLevelSettings = Seq(
organization := "com.twitter",
crossScalaVersions := Seq("2.10.6", "2.11.8"),
scalaVersion := "2.11.8",
crossScalaVersions := Seq("2.10.6", "2.11.8", "2.12.0"),
javacOptions ++= Seq("-source", "1.6", "-target", "1.6"),
javacOptions in doc := Seq("-source", "1.6"),
scalaVersion := "2.11.8",
coverageEnabled := (if (scalaVersion.value startsWith "2.11") true else false),
scalacOptions ++= Seq(
"-unchecked",
"-deprecation",
Expand Down Expand Up @@ -66,7 +67,6 @@ val buildLevelSettings = Seq(
)
)
)
inThisBuild(buildLevelSettings)

val sharedSettings = Seq(
// Publishing options:
Expand Down Expand Up @@ -140,8 +140,8 @@ lazy val bijection = {
Project(
id = "bijection",
base = file("."),
settings = sharedSettings
).enablePlugins(DocGen, SbtOsgi)
settings = buildLevelSettings ++ sharedSettings
).enablePlugins(DocGen, SbtOsgi, CrossPerProjectPlugin)
.settings(
test := {},
publish := {}, // skip publishing for this root project.
Expand Down Expand Up @@ -169,7 +169,7 @@ def module(name: String) = {
val id = s"bijection-$name"
Project(id = id, base = file(id))
.enablePlugins(SbtOsgi)
.settings(sharedSettings)
.settings(buildLevelSettings ++ sharedSettings)
.settings(
mimaPreviousArtifacts := youngestForwardCompatible(name),
mimaBinaryIssueFilters ++= ignoredABIProblems
Expand Down Expand Up @@ -244,6 +244,7 @@ lazy val bijectionGuava = {

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

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

lazy val bijectionFinagleMySql = {
module("finagle-mysql").settings(
crossScalaVersions := crossScalaVersions.value.filterNot(_.startsWith("2.12")),
osgiExportAll("com.twitter.bijection.finagle_mysql"),
libraryDependencies ++= Seq(
"com.twitter" %% "finagle-mysql" % "6.25.0",
Expand Down Expand Up @@ -347,8 +350,8 @@ lazy val bijectionJson4s = {
osgiExportAll("com.twitter.bijection.json4s"),
libraryDependencies ++= Seq(
"org.scala-lang" % "scala-reflect" % scalaVersion.value,
"org.json4s" %% "json4s-native" % "3.2.10",
"org.json4s" %% "json4s-ext" % "3.2.10"
"org.json4s" %% "json4s-native" % "3.5.0",
"org.json4s" %% "json4s-ext" % "3.5.0"
)
).dependsOn(
bijectionCore % "test->test;compile->compile"
Expand Down
1 change: 1 addition & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ resolvers ++= Seq(
)

addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.3")
addSbtPlugin("com.eed3si9n" % "sbt-doge" % "0.1.5")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0")
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.1.11")
addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.5.4")
Expand Down
4 changes: 2 additions & 2 deletions sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
# Author: Paul Phillips <[email protected]>

# todo - make this dynamic
declare -r sbt_release_version="0.13.12"
declare -r sbt_unreleased_version="0.13.12"
declare -r sbt_release_version="0.13.13"
declare -r sbt_unreleased_version="0.13.13"
declare -r buildProps="project/build.properties"

declare sbt_jar sbt_dir sbt_create sbt_version
Expand Down

0 comments on commit 886f42e

Please sign in to comment.