Skip to content

Commit

Permalink
Support Mill 0.13.0-M0-93-a6992e
Browse files Browse the repository at this point in the history
  • Loading branch information
joan38 committed Feb 22, 2025
1 parent c5cfbbd commit d07b61e
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions build.mill
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,12 @@ import mill.scalalib.publish.{Developer, License, PomSettings, VersionControl}
import org.typelevel.scalacoptions.ScalacOptions._
import org.typelevel.scalacoptions.{ScalaVersion, ScalacOptions}

object `mill-scalafix` extends Cross[MillScalafixCross]("0.12.0", "0.13.0-M0")
object `mill-scalafix` extends Cross[MillScalafixCross]("0.12.0", "0.13.0-M0-93-a6992e")
trait MillScalafixCross extends Cross.Module[String] with StyleModule with GitVersionedPublishModule {
val millVersion = crossValue
override def scalaVersion = millVersion match {
case "0.12.0" => "2.13.16"
case "0.13.0-M0" => "3.6.3"
}
override def scalaVersion = millVersion match
case millVersion if millVersion.startsWith("0.12") => "2.13.16"
case millVersion if millVersion.startsWith("0.13") => "3.6.3"
override def scalacOptions = super.scalacOptions() ++ ScalacOptions.tokensForVersion(
ScalaVersion.unsafeFromString(scalaVersion()),
ScalacOptions.default + source3 ++ fatalWarningOptions
Expand Down Expand Up @@ -64,6 +63,5 @@ trait MillScalafixCross extends Cross.Module[String] with StyleModule with GitVe

def millBinaryVersion(millVersion: String) = millVersion match {
case version if version.startsWith("0.12") => "0.11" // 0.12.x is binary compatible with 0.11.x
case version if version.startsWith("0.13") => "0.13"
case _ => throw new IllegalArgumentException(s"Unsupported Mill version: $millVersion")
}
case version if version.startsWith("0.13") => "0.13.0-M0"
case _ => throw IllegalArgumentException(s"Unsupported Mill version: $millVersion")

0 comments on commit d07b61e

Please sign in to comment.