Skip to content

Commit

Permalink
Update coursier to 2.1.0-RC6 (#445)
Browse files Browse the repository at this point in the history
  • Loading branch information
adpi2 committed Feb 16, 2023
1 parent e311405 commit 71d4f2c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
5 changes: 4 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down

0 comments on commit 71d4f2c

Please sign in to comment.