Permalink
Browse files

Merge pull request #149 from twitter/feature/mima

Add migration manager to prevent binary incompatiblities
  • Loading branch information...
2 parents 633e5b8 + 97b2cfc commit e3d19f73b9981020aef336f6e3128ff37b3ac0d6 @sritchie sritchie committed Mar 20, 2013
Showing with 12 additions and 1 deletion.
  1. +10 −1 project/Build.scala
  2. +2 −0 project/plugins.sbt
View
@@ -3,6 +3,8 @@ package algebird
import sbt._
import Keys._
import sbtgitflow.ReleasePlugin._
+import com.typesafe.tools.mima.plugin.MimaPlugin.mimaDefaultSettings
+import com.typesafe.tools.mima.plugin.MimaKeys.previousArtifact
object AlgebirdBuild extends Build {
val sharedSettings = Project.defaultSettings ++ releaseSettings ++ Seq(
@@ -64,7 +66,11 @@ object AlgebirdBuild extends Build {
<url>http://twitter.com/sritchie</url>
</developer>
</developers>)
- )
+ ) ++ mimaDefaultSettings
+
+ // This returns the youngest jar we released that is compatible with the current
+ def youngestForwardCompatible(subProj: String) =
+ Some("com.twitter" % ("algebird-" + subProj + "_2.9.2") % "0.1.11")
lazy val algebird = Project(
id = "algebird",
@@ -85,6 +91,7 @@ object AlgebirdBuild extends Build {
).settings(
test := { }, // All tests reside in algebirdTest
name := "algebird-core",
+ previousArtifact := youngestForwardCompatible("core"),
libraryDependencies += "com.googlecode.javaewah" % "JavaEWAH" % "0.6.6"
)
@@ -94,6 +101,7 @@ object AlgebirdBuild extends Build {
settings = sharedSettings
).settings(
name := "algebird-test",
+ previousArtifact := youngestForwardCompatible("test"),
libraryDependencies ++= Seq(
"org.scalacheck" %% "scalacheck" % "1.10.0",
"org.scala-tools.testing" %% "specs" % "1.6.9"
@@ -106,6 +114,7 @@ object AlgebirdBuild extends Build {
settings = sharedSettings
).settings(
name := "algebird-util",
+ previousArtifact := youngestForwardCompatible("util"),
libraryDependencies += "com.twitter" %% "util-core" % "6.2.0"
).dependsOn(algebirdCore, algebirdTest % "compile->test")
}
View
@@ -8,3 +8,5 @@ addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.5.0")
addSbtPlugin("com.twitter" % "sbt-gitflow" % "0.1.0")
addSbtPlugin("com.jsuereth" % "xsbt-gpg-plugin" % "0.6")
+
+addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.1.5")

0 comments on commit e3d19f7

Please sign in to comment.