From 3eef968162c107d95a615aeb3fb381b956ca8aba Mon Sep 17 00:00:00 2001 From: xuwei-k <6b656e6a69@gmail.com> Date: Thu, 24 Oct 2024 13:33:16 +0900 Subject: [PATCH] sbt 2 --- .github/workflows/ci.yml | 9 ++++++++- build.sbt | 10 +++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 461ece1..d7880ee 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,7 +37,14 @@ jobs: sbt -v scalafmtSbtCheck "+ scalafmtCheckAll" "+compile" "+test" ;; "scripted") - sbt -v "+ publishLocal" "+ sbt-plugin/scripted" + case ${{ matrix.os }} in + "windows-latest") + sbt -v "+ publishLocal" "sbt-plugin/scripted" + ;; + *) + sbt -v "+ publishLocal" "+ sbt-plugin/scripted" + ;; + esac ;; "test") sbt -v test '++ 3.3.4!' coreBinary/test diff --git a/build.sbt b/build.sbt index a1fa56a..b700032 100644 --- a/build.sbt +++ b/build.sbt @@ -156,6 +156,14 @@ lazy val sbtPlug: Project = Project( commonSettings, sbtPlugin := true, scriptedBatchExecution := false, + pluginCrossBuild / sbtVersion := { + scalaBinaryVersion.value match { + case "2.12" => + sbtVersion.value + case _ => + "2.0.0-M2" + } + }, name := "sbt-wartremover-contrib", scriptedBufferLog := false, scriptedLaunchOpts ++= { @@ -166,7 +174,7 @@ lazy val sbtPlug: Project = Project( javaVmArgs.filter(a => Seq("-Xmx", "-Xms", "-XX", "-Dsbt.log.noformat").exists(a.startsWith)) }, scriptedLaunchOpts += ("-Dplugin.version=" + version.value), - crossScalaVersions := Seq(scala212Latest), + crossScalaVersions := Seq(scala212Latest, scala3Latest), addSbtPlugin("org.wartremover" %% "sbt-wartremover" % wartremoverVersion), (Compile / sourceGenerators) += Def.task { val base = (Compile / sourceManaged).value