diff --git a/build.sbt b/build.sbt index 740d2528c..245010973 100644 --- a/build.sbt +++ b/build.sbt @@ -23,6 +23,7 @@ lazy val `lm-coursier` = project .settings( shared, Mima.settings, + Mima.lmCoursierFilters, libraryDependencies ++= Seq( "io.get-coursier" %% "coursier" % coursierVersion0, // We depend on librarymanagement-ivy rather than just @@ -41,6 +42,8 @@ lazy val `lm-coursier-shaded` = project .settings( shared, Mima.settings, + Mima.lmCoursierFilters, + Mima.lmCoursierShadedFilters, unmanagedSourceDirectories.in(Compile) := unmanagedSourceDirectories.in(Compile).in(`lm-coursier`).value, shading, shadingNamespace := "lmcoursier.internal.shaded", diff --git a/modules/lm-coursier/src/main/scala/lmcoursier/credentials/DirectCredentials.scala b/modules/lm-coursier/src/main/scala/lmcoursier/credentials/DirectCredentials.scala index 476863e73..e05cbe93c 100644 --- a/modules/lm-coursier/src/main/scala/lmcoursier/credentials/DirectCredentials.scala +++ b/modules/lm-coursier/src/main/scala/lmcoursier/credentials/DirectCredentials.scala @@ -2,8 +2,6 @@ package lmcoursier.credentials import java.net.URI -import coursier.core.Authentication - final class DirectCredentials private( val host: String, val username: String, @@ -77,11 +75,6 @@ final class DirectCredentials private( user == username } - def authentication: Authentication = - Authentication(username, password) - .withRealm(realm) - .withOptional(optional) - def get(): Seq[DirectCredentials] = Seq(this) diff --git a/project/Mima.scala b/project/Mima.scala index bdb5dfb02..7326f5eea 100644 --- a/project/Mima.scala +++ b/project/Mima.scala @@ -1,5 +1,6 @@ import com.typesafe.tools.mima.plugin.MimaPlugin +import com.typesafe.tools.mima.plugin.MimaKeys._ import sbt._ import sbt.Keys._ import sys.process._ @@ -30,4 +31,28 @@ object Mima { } ) + lazy val lmCoursierFilters = { + mimaBinaryIssueFilters ++= { + import com.typesafe.tools.mima.core._ + + Seq( + // Removed unused method, shouldn't have been there in the first place + ProblemFilters.exclude[DirectMissingMethodProblem]("lmcoursier.credentials.DirectCredentials.authentication") + ) + } + } + + lazy val lmCoursierShadedFilters = { + mimaBinaryIssueFilters ++= { + import com.typesafe.tools.mima.core._ + + Seq( + // Should have been put under lmcoursier.internal? + (pb: Problem) => pb.matchName.forall(!_.startsWith("lmcoursier.definitions.ToCoursier.")), + // ignore shaded and internal stuff related errors + (pb: Problem) => pb.matchName.forall(!_.startsWith("lmcoursier.internal.")) + ) + } + } + } diff --git a/project/project/plugins.sbt b/project/project/plugins.sbt index c1f826708..7a05b6941 100644 --- a/project/project/plugins.sbt +++ b/project/project/plugins.sbt @@ -1 +1 @@ -addSbtPlugin("io.get-coursier" % "sbt-coursier" % "1.1.0-M14-4") +addSbtPlugin("io.get-coursier" % "sbt-coursier" % "2.0.0-RC2")