Skip to content

Commit

Permalink
Fix up build, get bijection-util onto 2.12 (#262)
Browse files Browse the repository at this point in the history
* fix up build

* add coverage back in
  • Loading branch information
sritchie authored and johnynek committed Dec 11, 2016
1 parent acfc601 commit 19752a4
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 142 deletions.
32 changes: 27 additions & 5 deletions .travis.yml
Expand Up @@ -3,13 +3,35 @@ sudo: false
matrix:
include:
- scala: 2.10.6
script: ./sbt "+++$TRAVIS_SCALA_VERSION clean" "+++$TRAVIS_SCALA_VERSION scalafmtTest" "+++$TRAVIS_SCALA_VERSION test" "+++$TRAVIS_SCALA_VERSION mimaReportBinaryIssues"
script: ./sbt ++$TRAVIS_SCALA_VERSION clean scalafmtTest test mimaReportBinaryIssues

- scala: 2.11.8
script: ./sbt "+++$TRAVIS_SCALA_VERSION clean" "+++$TRAVIS_SCALA_VERSION scalafmtTest" "+++$TRAVIS_SCALA_VERSION test" "+++$TRAVIS_SCALA_VERSION coverageReport" "+++$TRAVIS_SCALA_VERSION mimaReportBinaryIssues"
script: ./sbt ++$TRAVIS_SCALA_VERSION clean coverage scalafmtTest test coverageReport mimaReportBinaryIssues
after_success:
- bash <(curl -s https://codecov.io/bash)

- scala: 2.12.0
- scala: 2.12.1
jdk: oraclejdk8
script: ./sbt "+++$TRAVIS_SCALA_VERSION clean" "+++$TRAVIS_SCALA_VERSION test"
after_success:
- bash <(curl -s https://codecov.io/bash)

cache:
directories:
- $HOME/.sbt/0.13/dependency
- $HOME/.sbt/boot/scala*
- $HOME/.sbt/launchers
- $HOME/.ivy2/cache
- $HOME/.nvm

before_cache:
- du -h -d 1 $HOME/.ivy2/cache
- du -h -d 2 $HOME/.sbt/
- find $HOME/.sbt -name "*.lock" -type f -delete
- find $HOME/.ivy2/cache -name "ivydata-*.properties" -type f -delete

notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/823bad727793c3cd3caf
on_success: change
on_failure: always
on_start: never
10 changes: 7 additions & 3 deletions README.md
@@ -1,4 +1,8 @@
## Bijection [![Build Status](https://secure.travis-ci.org/twitter/bijection.png)](http://travis-ci.org/twitter/bijection) [![Codecov](https://img.shields.io/codecov/c/github/twitter/bijection.svg?maxAge=2592000)](https://codecov.io/github/twitter/bijection)
## Bijection

[![Build Status](https://secure.travis-ci.org/twitter/bijection.png)](http://travis-ci.org/twitter/bijection) [![Codecov](https://img.shields.io/codecov/c/github/twitter/bijection.svg?maxAge=2592000)](https://codecov.io/github/twitter/bijection)
[![Latest version](https://index.scala-lang.org/twitter/bijection/bijection-core/latest.svg?color=orange)](https://index.scala-lang.org/twitter/bijection/bijection-core)
[![Chat](https://badges.gitter.im/twitter/bijection.svg)](https://gitter.im/twitter/bijection?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

A Bijection is an invertible function that converts back and forth between two types, with
the contract that a round-trip through the Bijection will bring back the original object. Moreover,
Expand Down Expand Up @@ -131,7 +135,7 @@ The latest ScalaDocs are hosted on Bijection's [Github Project Page](http://twit
## Get Involved + Code of Conduct
Pull requests and bug reports are always welcome!

Discussion occurs primarily on the [Bijection mailing list](https://groups.google.com/forum/#!forum/bijection).
Discussion occurs primarily on the [Bijection mailing list](https://groups.google.com/forum/#!forum/bijection).
Issues should be reported on the [GitHub issue tracker](https://github.com/twitter/bijection/issues).

We use a lightweight form of project governence inspired by the one used by Apache projects.
Expand Down Expand Up @@ -162,7 +166,7 @@ Current published artifacts are

Every artifact is published against Scala `"2.10"` and `"2.11"`. We currently publish a subset of bijection's modules against Scala `"2.12"`. Bijection modules - bijection-util and bijection-scrooge depend on other projects to publish 2.12 artifacts and currently aren't being published. To pull in the jars, make sure to add your desired scala version as a suffix, ie:

`bijection-core_2.10` or `bijection-core_2.11` or `bijection-core_2.12`.
`bijection-core_2.10` or `bijection-core_2.11` or `bijection-core_2.12`.

## Chat
[![Gitter](https://badges.gitter.im/twitter/bijection.svg)](https://gitter.im/twitter/bijection?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
Expand Down
35 changes: 23 additions & 12 deletions build.sbt
Expand Up @@ -5,13 +5,25 @@ import com.typesafe.sbt.osgi.SbtOsgi.autoImport._
import ReleaseTransformations._ // for sbt-release.
import bijection._

val finagleVersion = "6.25.0"
val scalatestVersion = "3.0.1"
val scalacheckVersion = "1.13.4"
val utilVersion = "6.34.0"
val utilVersion212 = "6.39.0"

def util(mod: String, scalaVersion: String) = {
val version =
if (scalaVersion startsWith "2.12") utilVersion212
else utilVersion
"com.twitter" %% (s"util-$mod") % version
}

val buildLevelSettings = Seq(
organization := "com.twitter",
crossScalaVersions := Seq("2.10.6", "2.11.8", "2.12.0"),
crossScalaVersions := Seq("2.10.6", "2.11.8", "2.12.1"),
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 All @@ -33,8 +45,8 @@ val buildLevelSettings = Seq(
"releases" at "https://oss.sonatype.org/content/repositories/releases"
),
libraryDependencies ++= Seq(
"org.scalacheck" %% "scalacheck" % "1.13.4" % "test",
"org.scalatest" %% "scalatest" % "3.0.1" % "test"
"org.scalacheck" %% "scalacheck" % scalacheckVersion % "test",
"org.scalatest" %% "scalatest" % scalatestVersion % "test"
),
parallelExecution in Test := true,
homepage := Some(url("https://github.com/twitter/bijection")),
Expand Down Expand Up @@ -140,8 +152,8 @@ lazy val bijection = {
Project(
id = "bijection",
base = file("."),
settings = buildLevelSettings ++ sharedSettings
).enablePlugins(DocGen, SbtOsgi, CrossPerProjectPlugin)
settings = buildLevelSettings ++ sharedSettings
).enablePlugins(SbtOsgi, CrossPerProjectPlugin)
.settings(
test := {},
publish := {}, // skip publishing for this root project.
Expand Down Expand Up @@ -249,8 +261,8 @@ lazy val bijectionScrooge = {
libraryDependencies ++= Seq(
"org.apache.thrift" % "libthrift" % "0.6.1" exclude ("junit", "junit"),
"com.twitter" %% "scrooge-serializer" % "3.17.0",
"com.twitter" %% "util-core" % "6.24.0",
"com.twitter" %% "finagle-core" % "6.25.0" % "test"
util("core", scalaVersion.value),
"com.twitter" %% "finagle-core" % finagleVersion % "test"
)
).dependsOn(
bijectionCore % "test->test;compile->compile",
Expand All @@ -270,9 +282,8 @@ 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"
libraryDependencies += util("core", scalaVersion.value)
).dependsOn(
bijectionCore % "test->test;compile->compile"
)
Expand All @@ -283,8 +294,8 @@ lazy val bijectionFinagleMySql = {
crossScalaVersions := crossScalaVersions.value.filterNot(_.startsWith("2.12")),
osgiExportAll("com.twitter.bijection.finagle_mysql"),
libraryDependencies ++= Seq(
"com.twitter" %% "finagle-mysql" % "6.25.0",
"com.twitter" %% "util-core" % "6.24.0"
"com.twitter" %% "finagle-mysql" % finagleVersion,
util("core", scalaVersion.value)
)
).dependsOn(
bijectionCore % "test->test;compile->compile"
Expand Down
50 changes: 0 additions & 50 deletions project/DocGen.scala

This file was deleted.

64 changes: 0 additions & 64 deletions project/Unidoc.scala

This file was deleted.

16 changes: 8 additions & 8 deletions project/plugins.sbt
Expand Up @@ -2,11 +2,11 @@ resolvers ++= Seq(
"jgit-repo" at "http://download.eclipse.org/jgit/maven"
)

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")
addSbtPlugin("com.typesafe.sbt" % "sbt-osgi" % "0.8.0")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.5.0")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "1.1")
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.12")
addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.5.4")
addSbtPlugin("com.typesafe.sbt" % "sbt-osgi" % "0.8.0")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.5.0")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "1.1")

0 comments on commit 19752a4

Please sign in to comment.