diff --git a/.github/workflows/h2-test.yml b/.github/workflows/h2-test.yml index cebef167e..b14464c94 100644 --- a/.github/workflows/h2-test.yml +++ b/.github/workflows/h2-test.yml @@ -20,11 +20,9 @@ jobs: matrix: include: # leaving out some combinations (note that `checks.yml` doesn't run H2 test) - - { scalaVersion: "2.13", jdkVersion: "1.8.0", jvmName: "temurin:1.8.0", extraOpts: '' } # { scalaVersion: "2.13", jdkVersion: "1.11.0", jvmName: "temurin:1.11.0", extraOpts: '-J-XX:+UnlockExperimentalVMOptions -J-XX:+UseJVMCICompiler' } - { scalaVersion: "2.13", jdkVersion: "1.17.0", jvmName: "temurin:1.17.0", extraOpts: '' } - # { scalaVersion: "3.1", jdkVersion: "1.8.0", jvmName: "temurin:1.8.0", extraOpts: '' } # { scalaVersion: "3.1", jdkVersion: "1.11.0", jvmName: "temurin:1.11.0", extraOpts: '-J-XX:+UnlockExperimentalVMOptions -J-XX:+UseJVMCICompiler' } # { scalaVersion: "3.1", jdkVersion: "1.17.0", jvmName: "temurin:1.17.0", extraOpts: '' } steps: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2e8f36f15..21878bf70 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -35,10 +35,10 @@ jobs: - name: Cache Coursier cache uses: coursier/cache-action@v6.4.0 - - name: Set up JDK 8 + - name: Set up JDK 11 uses: coursier/setup-action@v1.3.0 with: - jvm: temurin:1.8.0-352 + jvm: temurin:1.11.0.17 - name: Publish artifacts for all Scala versions env: diff --git a/build.sbt b/build.sbt index 3747c2d9c..57292a6bf 100644 --- a/build.sbt +++ b/build.sbt @@ -94,3 +94,10 @@ TaskKey[Unit]("verifyCodeFmt") := { } addCommandAlias("verifyCodeStyle", "headerCheck; verifyCodeFmt") + +val isJdk11orHigher: Boolean = { + val result = VersionNumber(sys.props("java.specification.version")).matchesSemVer(SemanticSelector(">=11")) + if (!result) + throw new IllegalArgumentException("JDK 11 or higher is required") + result +} diff --git a/project/ProjectAutoPlugin.scala b/project/ProjectAutoPlugin.scala index 45b22d5ad..280105c07 100644 --- a/project/ProjectAutoPlugin.scala +++ b/project/ProjectAutoPlugin.scala @@ -46,6 +46,10 @@ object ProjectAutoPlugin extends AutoPlugin { Test / fork := false, Test / parallelExecution := false, Test / logBuffered := true, + javacOptions ++= Seq( + "--release", + "11" + ), scalacOptions ++= Seq( "-encoding", "UTF-8", @@ -53,7 +57,8 @@ object ProjectAutoPlugin extends AutoPlugin { "-Xlog-reflective-calls", "-language:higherKinds", "-language:implicitConversions", - "-target:jvm-1.8"), + "-release", + "11"), Compile / scalacOptions ++= (CrossVersion.partialVersion(scalaVersion.value) match { case Some((2, 13)) => disciplineScalacOptions -- Set( diff --git a/project/project-info.conf b/project/project-info.conf index 24ca2b565..df9fc8498 100644 --- a/project/project-info.conf +++ b/project/project-info.conf @@ -2,7 +2,7 @@ project-info { version: "current" scaladoc: "https://doc.akka.io/api/akka-persistence-jdbc/"${project-info.version}"/akka/persistence/jdbc/" shared-info { - jdk-versions: ["Adopt OpenJDK 8", "Adopt OpenJDK 11"] + jdk-versions: ["Eclipse Temurin JDK 11", "Eclipse Temurin JDK 17"] snapshots: { url: "snapshots.html" text: "Snapshots are available"