Skip to content

Commit

Permalink
add sbt 2.x build setting
Browse files Browse the repository at this point in the history
  • Loading branch information
xuwei-k committed Oct 7, 2024
1 parent a3ef1b9 commit b33866f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ jobs:
distribution: 'temurin'
java-version: '8'
cache: 'sbt'
- run: sbt +test scripted mimaReportBinaryIssues
- run: sbt +test +scripted mimaReportBinaryIssues
6 changes: 5 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ val dynver = project.settings(
libraryDependencies += "org.eclipse.jgit" % "org.eclipse.jgit" % "5.13.3.202401111512-r" % Test,
libraryDependencies += "org.scalacheck" %% "scalacheck" % "1.18.1" % Test,
publishSettings,
crossScalaVersions ++= Seq(scala2_13, scala3),
crossScalaVersions := Seq(scala2_12, scala2_13, scala3),
scripted := (()),
scalacOptions := {
scalaBinaryVersion.value match {
case "3" | "2.13" => scalacOptions.value.filterNot(scalacOptions212.contains(_))
Expand All @@ -61,9 +62,11 @@ val sbtdynver = project.dependsOn(dynverLib).enablePlugins(SbtPlugin).settings(
scriptedDependencies := Seq(dynver / publishLocal, publishLocal).dependOn.value,
scriptedLaunchOpts += s"-Dplugin.version=${version.value}",
scriptedLaunchOpts += s"-Dsbt.boot.directory=${file(sys.props("user.home")) / ".sbt" / "boot"}",
crossScalaVersions := Seq(scala2_12, scala3),
(pluginCrossBuild / sbtVersion) := {
scalaBinaryVersion.value match {
case "2.12" => "1.3.0"
case _ => "2.0.0-M2"
}
},
publishSettings,
Expand All @@ -73,6 +76,7 @@ lazy val publishSettings = Def.settings(
MimaSettings.mimaSettings,
)

crossScalaVersions := Seq(scala2_12, scala3)
mimaPreviousArtifacts := Set.empty
publish / skip := true
Global / cancelable := true

0 comments on commit b33866f

Please sign in to comment.