Skip to content

Commit

Permalink
don't run scripted with incompatible versions of sbt on JDK17
Browse files Browse the repository at this point in the history
  • Loading branch information
bjaglin committed Jan 11, 2022
1 parent b6b1b28 commit 31ad03b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- uses: olafurpg/setup-scala@v13
with:
java-version: 17
- run: sbt test scripted
- run: sbt "test; scripted sbt-scalafix/*"
windows:
name: Windows tests
runs-on: windows-latest
Expand Down
8 changes: 6 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,12 @@ scalaVersion := "2.12.15"
// keep this as low as possible to avoid running into binary incompatibility such as https://github.com/sbt/sbt/issues/5049
pluginCrossBuild / sbtVersion := "1.2.1"

// first release that can build 2.13 (as it bring a Zinc version with a compiler-bridge published for 2.13)
scriptedSbt := "1.2.7"
scriptedSbt := {
if (System.getProperty("java.specification.version").toDouble < 17)
"1.2.7" // first release that can build 2.13 (as it bring a Zinc version with a compiler-bridge published for 2.13)
else
"1.6.0" // first release that supports JDK17
}

libraryDependencies += compilerPlugin(scalafixSemanticdb)

Expand Down

0 comments on commit 31ad03b

Please sign in to comment.