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