mirror of https://github.com/sbt/sbt.git
Add semver reconciliation test (#131)
This commit is contained in:
parent
c89f1b7124
commit
9a1e1d0f89
|
|
@ -4,12 +4,14 @@ object Reconciliation {
|
|||
case object Default extends Reconciliation
|
||||
case object Relaxed extends Reconciliation
|
||||
case object Strict extends Reconciliation
|
||||
case object SemVer extends Reconciliation
|
||||
|
||||
def apply(input: String): Option[Reconciliation] =
|
||||
input match {
|
||||
case "default" => Some(Default)
|
||||
case "relaxed" => Some(Relaxed)
|
||||
case "strict" => Some(Strict)
|
||||
case "semver" => Some(SemVer)
|
||||
case _ => None
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ object ToCoursier {
|
|||
case Reconciliation.Default => coursier.core.Reconciliation.Default
|
||||
case Reconciliation.Relaxed => coursier.core.Reconciliation.Relaxed
|
||||
case Reconciliation.Strict => coursier.core.Reconciliation.Strict
|
||||
case Reconciliation.SemVer => coursier.core.Reconciliation.SemVer
|
||||
}
|
||||
|
||||
def reconciliation(rs: Vector[(ModuleMatchers, Reconciliation)]):
|
||||
|
|
|
|||
|
|
@ -0,0 +1,31 @@
|
|||
|
||||
lazy val semver61 = project
|
||||
.settings(
|
||||
scalaVersion := "2.11.12",
|
||||
libraryDependencies ++= Seq(
|
||||
"com.github.alexarchambault" %% "argonaut-shapeless_6.2" % "1.2.0-M11",
|
||||
"io.argonaut" %% "argonaut" % "6.1"
|
||||
),
|
||||
versionReconciliation += "*" % "*" % "semver"
|
||||
)
|
||||
|
||||
lazy val semver62 = project
|
||||
.settings(
|
||||
scalaVersion := "2.11.12",
|
||||
libraryDependencies ++= Seq(
|
||||
"com.github.alexarchambault" %% "argonaut-shapeless_6.2" % "1.2.0-M11",
|
||||
"io.argonaut" %% "argonaut" % "6.2"
|
||||
),
|
||||
versionReconciliation += "*" % "*" % "semver"
|
||||
)
|
||||
|
||||
lazy val strict62 = project
|
||||
.settings(
|
||||
scalaVersion := "2.11.12",
|
||||
libraryDependencies ++= Seq(
|
||||
"com.github.alexarchambault" %% "argonaut-shapeless_6.2" % "1.2.0-M11",
|
||||
"io.argonaut" %% "argonaut" % "6.2"
|
||||
),
|
||||
versionReconciliation += "*" % "*" % "strict"
|
||||
)
|
||||
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
addSbtPlugin {
|
||||
|
||||
val name = sys.props.getOrElse(
|
||||
"plugin.name",
|
||||
sys.error("plugin.name Java property not set")
|
||||
)
|
||||
val version = sys.props.getOrElse(
|
||||
"plugin.version",
|
||||
sys.error("plugin.version Java property not set")
|
||||
)
|
||||
|
||||
"io.get-coursier" % name % version
|
||||
}
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
-> semver61/update
|
||||
> semver62/update
|
||||
-> strict62/update
|
||||
Loading…
Reference in New Issue