Skip to content

Commit 642b410

Browse files
authored
Merge pull request #2823 from lefou/fix-mill
Fix: Replaced import logic in predef script for Mill projects
2 parents 183b757 + 71040bf commit 642b410

File tree

1 file changed

+2
-7
lines changed
  • modules/core/src/main/scala/org/scalasteward/core/buildtool/mill

1 file changed

+2
-7
lines changed

modules/core/src/main/scala/org/scalasteward/core/buildtool/mill/MillAlg.scala

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -85,19 +85,14 @@ final class MillAlg[F[_]](implicit
8585
object MillAlg {
8686
private[mill] def content(millVersion: Option[Version]) = {
8787
def rawContent(millBinPlatform: String) =
88-
s"""|import coursierapi.MavenRepository
89-
|
90-
|interp.repositories() ++= Seq(
91-
| MavenRepository.of("https://oss.sonatype.org/content/repositories/snapshots/")
92-
|)
93-
|interp.load.ivy("${org.scalasteward.core.BuildInfo.organization}" %% "${org.scalasteward.core.BuildInfo.millPluginArtifactName}_mill${millBinPlatform}" % "${org.scalasteward.core.BuildInfo.millPluginVersion}")
88+
s"""|import $$ivy.`${org.scalasteward.core.BuildInfo.organization}::${org.scalasteward.core.BuildInfo.millPluginArtifactName}_mill${millBinPlatform}:${org.scalasteward.core.BuildInfo.millPluginVersion}`
9489
|""".stripMargin
9590

9691
millVersion match {
9792
case None => rawContent("$MILL_BIN_PLATFORM")
9893
case Some(millVersion) =>
9994
millVersion.value.trim.split("[.]", 3).take(2) match {
100-
// We support these platform, but we can't take the $$MILL_BIN_PLATFORM support for granted
95+
// We support these platforms, but we can't take the $MILL_BIN_PLATFORM support for granted
10196
case Array("0", "6") => rawContent("0.6")
10297
case Array("0", "7" | "8") => rawContent("0.7")
10398
case Array("0", "9") => rawContent("0.9")

0 commit comments

Comments
 (0)