Skip to content

Commit d2c419f

Browse files
gacevedompollmeier
andauthored
Require JDK13+ due to the use of FileSystems.newFileSystem(Path) (#5724)
* Require JDK13+ due to the use of `FileSystems.newFileSystem(Path)` * Release to remain 11 Co-authored-by: Michael Pollmeier <michael@michaelpollmeier.com> * Release to remain 11, not 13 --------- Co-authored-by: Michael Pollmeier <michael@michaelpollmeier.com>
1 parent 7b6ab6c commit d2c419f

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

build.sbt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ ThisBuild / compile / javacOptions ++= Seq(
6161
"-Xlint",
6262
"--release=11"
6363
) ++ {
64-
// fail early if users with JDK8 try to run this
64+
// Require Java 13+ due to FileSystems.newFileSystem(Path) API used in project/FileUtils.scala
6565
val javaVersion = sys.props("java.specification.version").toFloat
66-
assert(javaVersion.toInt >= 11, s"this build requires JDK11+ - you're using $javaVersion")
66+
assert(javaVersion.toInt >= 13, s"this build requires JDK13+ - you're using $javaVersion")
6767
Nil
6868
}
6969

project/meta-build.sbt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
// Require Java 13+ due to FileSystems.newFileSystem(Path) API used in project/FileUtils.scala
2+
// This method signature was added in JDK13
3+
initialize := {
4+
val _ = initialize.value
5+
val javaVersion = sys.props("java.specification.version").toFloat
6+
assert(javaVersion.toInt >= 13, s"this build requires JDK13+ - you're using $javaVersion")
7+
}
8+
19
libraryDependencies ++= Seq(
210
"com.typesafe" % "config" % "1.4.3",
311
"com.michaelpollmeier" % "versionsort" % "1.0.11",

0 commit comments

Comments
 (0)