Skip to content

Commit

Permalink
Cross-build sbt-metals for sbt2
Browse files Browse the repository at this point in the history
  • Loading branch information
keynmol committed Dec 18, 2024
1 parent a4a6122 commit 5679881
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
13 changes: 13 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,20 @@ lazy val `sbt-metals` = project
"lastSupportedSemanticdb" -> SemanticDbSupport.last,
),
scalaVersion := V.scala212,
crossScalaVersions := Seq(V.scala212, V.scala3ForSBT2),
scriptedLaunchOpts ++= Seq(s"-Dplugin.version=${version.value}"),
(pluginCrossBuild / sbtVersion) := {
scalaBinaryVersion.value match {
case "2.12" => "1.5.8"
case _ => "2.0.0-M3"
}
},
scalacOptions ++= {
scalaBinaryVersion.value match {
case "2.12" => "-Xsource:3" :: Nil
case _ => Nil
}
},
)
.settings(sharedScalacOptions)
.enablePlugins(BuildInfoPlugin, SbtPlugin)
Expand Down
1 change: 1 addition & 0 deletions project/V.scala
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ object V {
val scala213 = "2.13.15"
val lastPublishedScala3 = "3.3.3"
val scala3 = "3.3.4"
val scala3ForSBT2 = "3.6.2"

// When you can add to removedScalaVersions in MtagsResolver.scala with the last released version
val sbtScala = "2.12.18"
Expand Down

0 comments on commit 5679881

Please sign in to comment.