Skip to content

Commit

Permalink
old sbt versions can run on recent JDKs when loaded with scripted
Browse files Browse the repository at this point in the history
  • Loading branch information
bjaglin committed Feb 24, 2024
1 parent ba609f7 commit f87c5c4
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,6 @@ scalaVersion := "2.12.19"
// keep this as low as possible to avoid running into binary incompatibility such as https://github.com/sbt/sbt/issues/5049
pluginCrossBuild / sbtVersion := "1.3.1"

scriptedSbt := {
val jdk = System.getProperty("java.specification.version").toDouble

if (jdk >= 21)
"1.9.0" // first release that supports JDK21
else if (jdk >= 17)
"1.5.5" // first release that supports JDK17
else
"1.3.0"
}

libraryDependencies += compilerPlugin(scalafixSemanticdb)

scalacOptions ++= List("-Ywarn-unused", "-Yrangepos")
Expand Down

0 comments on commit f87c5c4

Please sign in to comment.