Add semver reconciliation test (#131)

This commit is contained in:
Alexandre Archambault 2019-09-11 13:41:51 +02:00 committed by GitHub
parent c89f1b7124
commit 9a1e1d0f89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 50 additions and 0 deletions

View File

@ -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
}
}

View File

@ -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)]):

View File

@ -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"
)

View File

@ -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
}

View File

@ -0,0 +1,3 @@
-> semver61/update
> semver62/update
-> strict62/update