From b33866f80c4b7692cf3879dd26c08fff8a154940 Mon Sep 17 00:00:00 2001 From: xuwei-k <6b656e6a69@gmail.com> Date: Sun, 6 Oct 2024 15:07:28 +0900 Subject: [PATCH] add sbt 2.x build setting --- .github/workflows/ci.yml | 2 +- build.sbt | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a202d50..8628c35 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,4 +16,4 @@ jobs: distribution: 'temurin' java-version: '8' cache: 'sbt' - - run: sbt +test scripted mimaReportBinaryIssues + - run: sbt +test +scripted mimaReportBinaryIssues diff --git a/build.sbt b/build.sbt index b44aec3..9156296 100644 --- a/build.sbt +++ b/build.sbt @@ -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(_)) @@ -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, @@ -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