Skip to content

Commit efdab4d

Browse files
committed
Check binary compatibility with MiMa
1 parent 6b04109 commit efdab4d

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

build.sbt

+12
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import com.typesafe.tools.mima.plugin.{MimaPlugin, MimaKeys}
2+
13
scalaModuleSettings
24

35
name := "scala-xml"
@@ -25,6 +27,16 @@ libraryDependencies += ("org.scala-lang" % "scala-compiler" % scalaVersion.value
2527
// alternatively, manage the scala instance as shown below (commented)
2628
fork in Test := true
2729

30+
MimaPlugin.mimaDefaultSettings
31+
32+
MimaKeys.previousArtifact := Some(organization.value % s"${name.value}_2.11.0-RC1" % "1.0.0")
33+
34+
// run mima during tests
35+
test in Test := {
36+
MimaKeys.reportBinaryIssues.value
37+
(test in Test).value
38+
}
39+
2840
// ALTERNATIVE: manage the Scala instance ourselves to exclude the published scala-xml (scala-compiler depends on it)
2941
// since this dependency hides the classes we're testing
3042
// managedScalaInstance := false

project/plugins.sbt

+3-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
addSbtPlugin("org.scala-lang.modules" % "scala-module-plugin" % "1.0.1")
1+
addSbtPlugin("org.scala-lang.modules" % "scala-module-plugin" % "1.0.2")
2+
3+
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.1.6")

0 commit comments

Comments
 (0)