diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 0d211c0d..6c5a55e7 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -31,10 +31,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 + jvm: temurin:1.11.0 - name: Code style check, compilation and binary-compatibility check run: |- diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 1f557c7e..c92fffdf 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -18,7 +18,6 @@ jobs: matrix: include: # cover relevant combinations when combined with the matrix Yugabyte tests - # { scalaVersion: "2.13", jdkVersion: "1.8.0", jvmName: "temurin:1.8.0", extraOpts: '', testCmd: "test"} # { scalaVersion: "2.13", jdkVersion: "1.11.0", jvmName: "temurin:1.11.0", extraOpts: '-J-XX:+UnlockExperimentalVMOptions -J-XX:+UseJVMCICompiler', testCmd: "test"} - { scalaVersion: "2.13", jdkVersion: "1.17.0", jvmName: "temurin:1.17.0", extraOpts: '', testCmd: "test"} - { scalaVersion: "3.3", jdkVersion: "1.17.0", jvmName: "temurin:1.17.0", extraOpts: '', testCmd: "core/test"} @@ -71,7 +70,6 @@ jobs: matrix: include: # cover relevant combinations when combined with the matrix Postgres tests - - { scalaVersion: "2.13", jdkVersion: "1.8.0", jvmName: "temurin:1.8.0", extraOpts: '', testCmd: "test" } - { scalaVersion: "2.13", jdkVersion: "1.11.0", jvmName: "temurin:1.11.0", extraOpts: '-J-XX:+UnlockExperimentalVMOptions -J-XX:+UseJVMCICompiler', testCmd: "test" } # { scalaVersion: "2.13", jdkVersion: "1.17.0", jvmName: "temurin:1.17.0", extraOpts: '', testCmd: "test" } - { scalaVersion: "3.3", jdkVersion: "1.17.0", jvmName: "temurin:1.17.0", extraOpts: '', testCmd: "core/test"} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 6e937d33..272c5657 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -24,10 +24,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: adopt:1.8.0-275 + jvm: temurin:1.11.0.17 - name: Publish run: |- diff --git a/build.sbt b/build.sbt index 0c57d878..ba89563d 100644 --- a/build.sbt +++ b/build.sbt @@ -43,7 +43,8 @@ def common: Seq[Setting[_]] = scalafmtOnCompile := true, sonatypeProfileName := "com.lightbend", // Setting javac options in common allows IntelliJ IDEA to import them automatically - Compile / javacOptions ++= Seq("-encoding", "UTF-8", "-source", "1.8", "-target", "1.8"), + Compile / javacOptions ++= Seq("-encoding", "UTF-8", "--release", "11"), + Compile / scalacOptions ++= Seq("-release", "11"), headerLicense := Some( HeaderLicense.Custom("""Copyright (C) 2022 - 2023 Lightbend Inc. """)), Test / logBuffered := false, @@ -161,3 +162,10 @@ lazy val docs = project resolvers += Resolver.jcenterRepo, publishRsyncArtifacts += makeSite.value -> "www/", publishRsyncHost := "akkarepo@gustav.akka.io") + +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/project-info.conf b/project/project-info.conf index 64c7b4cb..b41638b7 100644 --- a/project/project-info.conf +++ b/project/project-info.conf @@ -1,7 +1,7 @@ project-info { version: "current" shared-info { - jdk-versions: ["OpenJDK 8", "OpenJDK 11", "OpenJDK 17"] + jdk-versions: ["Eclipse Temurin JDK 11", "Eclipse Temurin JDK 17"] issues: { url: "https://github.com/akka/akka-persistence-r2dbc/issues" text: "Github issues"