mirror of https://github.com/sbt/sbt.git
Ensure we don't break binary compatibility in lm-coursier
This commit is contained in:
parent
5739ea7b60
commit
62d1ab0249
|
|
@ -21,6 +21,7 @@ lazy val `lm-coursier` = project
|
|||
.in(file("modules/lm-coursier"))
|
||||
.settings(
|
||||
shared,
|
||||
Mima.settings,
|
||||
libraryDependencies ++= Seq(
|
||||
"io.get-coursier" %% "coursier" % coursierVersion0,
|
||||
// We depend on librarymanagement-ivy rather than just
|
||||
|
|
|
|||
|
|
@ -0,0 +1,33 @@
|
|||
|
||||
import com.typesafe.tools.mima.plugin.MimaPlugin
|
||||
import sbt._
|
||||
import sbt.Keys._
|
||||
import sys.process._
|
||||
|
||||
object Mima {
|
||||
|
||||
private def stable(ver: String): Boolean =
|
||||
ver.exists(c => c != '0' && c != '.') &&
|
||||
ver
|
||||
.replace("-RC", "-")
|
||||
.forall(c => c == '.' || c == '-' || c.isDigit)
|
||||
|
||||
def binaryCompatibilityVersions: Set[String] =
|
||||
Seq("git", "tag", "--merged", "HEAD^", "--contains", "736d5c11")
|
||||
.!!
|
||||
.linesIterator
|
||||
.map(_.trim)
|
||||
.filter(_.startsWith("v"))
|
||||
.map(_.stripPrefix("v"))
|
||||
.filter(stable)
|
||||
.toSet
|
||||
|
||||
def settings: Seq[Setting[_]] = Seq(
|
||||
MimaPlugin.autoImport.mimaPreviousArtifacts := {
|
||||
binaryCompatibilityVersions.map { ver =>
|
||||
(organization.value % moduleName.value % ver).cross(crossVersion.value)
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue