mirror of https://github.com/sbt/sbt.git
Update coursier to 2.1.0-RC6 (#445)
This commit is contained in:
parent
e311405bab
commit
71d4f2c969
|
|
@ -24,7 +24,7 @@ inThisBuild(List(
|
|||
Global / excludeLintKeys += scriptedBufferLog
|
||||
Global / excludeLintKeys += scriptedLaunchOpts
|
||||
|
||||
val coursierVersion0 = "2.1.0-RC5"
|
||||
val coursierVersion0 = "2.1.0-RC6"
|
||||
|
||||
def dataclassGen(data: Reference) = Def.taskDyn {
|
||||
val root = (ThisBuild / baseDirectory).value.toURI.toString
|
||||
|
|
@ -80,6 +80,7 @@ lazy val `lm-coursier` = project
|
|||
Mima.lmCoursierFilters,
|
||||
libraryDependencies ++= Seq(
|
||||
"io.get-coursier" %% "coursier" % coursierVersion0,
|
||||
"io.get-coursier" %% "coursier-sbt-maven-repository" % coursierVersion0,
|
||||
"io.get-coursier.jniutils" % "windows-jni-utils-lmcoursier" % jniUtilsVersion,
|
||||
"net.hamnaberg" %% "dataclass-annotation" % dataclassScalafixV % Provided,
|
||||
// We depend on librarymanagement-ivy rather than just
|
||||
|
|
@ -114,6 +115,7 @@ lazy val `lm-coursier-shaded` = project
|
|||
Compile / sources := (`lm-coursier` / Compile / sources).value,
|
||||
shadedModules ++= Set(
|
||||
"io.get-coursier" %% "coursier",
|
||||
"io.get-coursier" %% "coursier-sbt-maven-repository",
|
||||
"io.get-coursier.jniutils" % "windows-jni-utils-lmcoursier"
|
||||
),
|
||||
validNamespaces += "lmcoursier",
|
||||
|
|
@ -188,6 +190,7 @@ lazy val `lm-coursier-shaded` = project
|
|||
},
|
||||
libraryDependencies ++= Seq(
|
||||
"io.get-coursier" %% "coursier" % coursierVersion0,
|
||||
"io.get-coursier" %% "coursier-sbt-maven-repository" % coursierVersion0,
|
||||
"io.get-coursier.jniutils" % "windows-jni-utils-lmcoursier" % jniUtilsVersion,
|
||||
"net.hamnaberg" %% "dataclass-annotation" % dataclassScalafixV % Provided,
|
||||
"org.scala-lang.modules" %% "scala-collection-compat" % "2.9.0",
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import coursier.{Resolution, Resolve}
|
|||
import coursier.cache.loggers.{FallbackRefreshDisplay, ProgressBarRefreshDisplay, RefreshLogger}
|
||||
import coursier.core._
|
||||
import coursier.ivy.IvyRepository
|
||||
import coursier.maven.MavenRepository
|
||||
import coursier.maven.MavenRepositoryLike
|
||||
import coursier.params.rule.RuleResolution
|
||||
import sbt.util.Logger
|
||||
|
||||
|
|
@ -63,7 +63,7 @@ object ResolutionRun {
|
|||
s"ivy:${r.pattern}"
|
||||
case _: InterProjectRepository =>
|
||||
"inter-project"
|
||||
case r: MavenRepository =>
|
||||
case r: MavenRepositoryLike =>
|
||||
r.root
|
||||
case r =>
|
||||
// should not happen
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import java.nio.file.Paths
|
|||
import coursier.cache.CacheUrl
|
||||
import coursier.core.{Authentication, Repository}
|
||||
import coursier.ivy.IvyRepository
|
||||
import coursier.maven.MavenRepository
|
||||
import coursier.maven.SbtMavenRepository
|
||||
import org.apache.ivy.plugins.resolver.IBiblioResolver
|
||||
import sbt.librarymanagement.{Configuration => _, MavenRepository => _, _}
|
||||
import sbt.util.Logger
|
||||
|
|
@ -32,12 +32,12 @@ object Resolvers {
|
|||
log: Logger,
|
||||
authentication: Option[Authentication],
|
||||
classLoaders: Seq[ClassLoader]
|
||||
): Option[MavenRepository] =
|
||||
): Option[SbtMavenRepository] =
|
||||
try {
|
||||
CacheUrl.url(root, classLoaders) // ensure root is a URL whose protocol can be handled here
|
||||
val root0 = if (root.endsWith("/")) root else root + "/"
|
||||
Some(
|
||||
MavenRepository(
|
||||
SbtMavenRepository(
|
||||
root0,
|
||||
authentication = authentication
|
||||
)
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ check := {
|
|||
def containsRepo(repo: String): Boolean = {
|
||||
val accepted = Set(repo, repo.stripSuffix("/"))
|
||||
parsedCoursierResolvers.exists {
|
||||
case m: coursier.maven.MavenRepository => accepted(m.root)
|
||||
case m: coursier.maven.MavenRepositoryLike => accepted(m.root)
|
||||
case _ => false
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue