mirror of https://github.com/sbt/sbt.git
Pass some missing strict parameters to coursier (#244)
This commit is contained in:
parent
5e5939d693
commit
cc9d567917
|
|
@ -1,11 +1,14 @@
|
|||
package lmcoursier.definitions
|
||||
|
||||
import dataclass.data
|
||||
import dataclass._
|
||||
|
||||
@data class Strict(
|
||||
include: Set[(String, String)] = Set(("*", "*")),
|
||||
exclude: Set[(String, String)] = Set.empty,
|
||||
ignoreIfForcedVersion: Boolean = true
|
||||
ignoreIfForcedVersion: Boolean = true,
|
||||
@since
|
||||
includeByDefault: Boolean = false,
|
||||
semVer: Boolean = false
|
||||
) {
|
||||
def addInclude(include: (String, String)*): Strict =
|
||||
withInclude(this.include ++ include)
|
||||
|
|
|
|||
|
|
@ -45,7 +45,8 @@ object ToCoursier {
|
|||
},
|
||||
include = matcher.include map { x =>
|
||||
coursier.util.ModuleMatcher(module(x))
|
||||
}
|
||||
},
|
||||
includeByDefault = matcher.includeByDefault
|
||||
)
|
||||
|
||||
def reconciliation(r: Reconciliation): coursier.core.Reconciliation =
|
||||
|
|
@ -169,15 +170,18 @@ object ToCoursier {
|
|||
}
|
||||
|
||||
def strict(strict: Strict): coursier.params.rule.Strict =
|
||||
coursier.params.rule.Strict(
|
||||
include = strict.include.map {
|
||||
case (o, n) => coursier.util.ModuleMatcher(coursier.Module(coursier.Organization(o), coursier.ModuleName(n)))
|
||||
},
|
||||
exclude = strict.exclude.map {
|
||||
case (o, n) => coursier.util.ModuleMatcher(coursier.Module(coursier.Organization(o), coursier.ModuleName(n)))
|
||||
},
|
||||
// ignoreIfForcedVersion = strict.ignoreIfForcedVersion // should be around once the coursier version is bumped
|
||||
)
|
||||
coursier.params.rule.Strict()
|
||||
.withInclude(strict.include.map {
|
||||
case (o, n) =>
|
||||
coursier.util.ModuleMatcher(coursier.Module(coursier.Organization(o), coursier.ModuleName(n)))
|
||||
})
|
||||
.withExclude(strict.exclude.map {
|
||||
case (o, n) =>
|
||||
coursier.util.ModuleMatcher(coursier.Module(coursier.Organization(o), coursier.ModuleName(n)))
|
||||
})
|
||||
.withIncludeByDefault(strict.includeByDefault)
|
||||
.withIgnoreIfForcedVersion(strict.ignoreIfForcedVersion)
|
||||
.withSemVer(strict.semVer)
|
||||
|
||||
def cachePolicy(r: CachePolicy): coursier.cache.CachePolicy =
|
||||
r match {
|
||||
|
|
|
|||
|
|
@ -17,3 +17,14 @@ lazy val b = project
|
|||
// strict cm should be fine if we force the conflicting module version
|
||||
dependencyOverrides += "com.chuusai" %% "shapeless" % "2.3.3"
|
||||
)
|
||||
|
||||
lazy val c = project
|
||||
.settings(
|
||||
// no shared settings here
|
||||
scalaVersion := "2.12.11",
|
||||
libraryDependencies ++= Seq(
|
||||
"com.github.alexarchambault" %% "argonaut-shapeless_6.2" % "1.2.0",
|
||||
"com.chuusai" %% "shapeless" % "2.3.2"
|
||||
),
|
||||
versionReconciliation += "com.github.alexarchambault" %% "argonaut-shapeless_6.2" % "strict"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,2 +1,3 @@
|
|||
-> a/update
|
||||
> b/update
|
||||
> c/update
|
||||
|
|
|
|||
Loading…
Reference in New Issue