diff --git a/.github/workflows/check-build-test.yml b/.github/workflows/check-build-test.yml index 78f35d65d9..210ba2456d 100644 --- a/.github/workflows/check-build-test.yml +++ b/.github/workflows/check-build-test.yml @@ -43,32 +43,6 @@ jobs: - name: "Code style, compile tests, MiMa. Run locally with: sbt \"verifyCodeStyle; +Test/compile; mimaReportBinaryIssues\"" run: sbt "verifyCodeStyle; +Test/compile; mimaReportBinaryIssues" - compile-jdk-8: - name: Compile with JDK 8 - runs-on: ubuntu-22.04 - env: - JAVA_OPTS: -Xms2G -Xmx2G -Xss2M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8 - - steps: - - name: Checkout - uses: actions/checkout@v3.1.0 - with: # https://github.com/olafurpg/setup-scala#faster-checkout-of-big-repos - fetch-depth: 100 - - - name: Fetch tags - run: git fetch --depth=100 origin +refs/tags/*:refs/tags/* - - - name: Set up JDK 8 - uses: coursier/setup-action@v1.3.0 - with: - jvm: adopt:1.8.0-275 - - - name: Cache Coursier cache - uses: coursier/cache-action@v6.4.0 - - - name: "Compile JDK 8" - run: sbt compile - documentation: name: ScalaDoc, Documentation with Paradox runs-on: ubuntu-22.04 @@ -168,11 +142,11 @@ jobs: CONNECTOR: ${{ matrix.connector }} run: ./scripts/gh-detect-changes.sh "${CONNECTOR}" - - name: Set up JDK 8 + - name: Set up JDK 11 if: env.execute_build == 'true' uses: coursier/setup-action@v1.3.0 with: - jvm: temurin:1.8 + jvm: temurin:1.11 - name: Cache Coursier cache if: env.execute_build == 'true' diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 0b24db4fe2..a9c009eff8 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -29,11 +29,10 @@ jobs: - name: Cache Coursier cache uses: coursier/cache-action@v6.4.0 - # Release must be with JDK 8 because --release 8 flag prevents access to com.sun.nio.file.SensitivityWatchEventModifier - - 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 artifacts for all Scala versions env: diff --git a/build.sbt b/build.sbt index 736e0c4f59..eeea3c7358 100644 --- a/build.sbt +++ b/build.sbt @@ -512,3 +512,10 @@ Global / onLoad := (Global / onLoad).value.andThen { s => ) s } + +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/Common.scala b/project/Common.scala index 9a990d0307..4676330df9 100644 --- a/project/Common.scala +++ b/project/Common.scala @@ -114,9 +114,9 @@ object Common extends AutoPlugin { "-Xlint:try", "-Xlint:unchecked", "-Xlint:varargs" - // Release must be with JDK 8 because this flag prevents access to com.sun.nio.file.SensitivityWatchEventModifier + // Release must be with JDK 11 because this flag prevents access to com.sun.nio.file.SensitivityWatchEventModifier // "--release", - // "8" + // "11" ), compile / javacOptions ++= (scalaVersion.value match { case Dependencies.Scala213 if insideCI.value && fatalWarnings.value && !Dependencies.CronBuild => diff --git a/project/project-info.conf b/project/project-info.conf index 9c5bf77d41..e769f2f21f 100644 --- a/project/project-info.conf +++ b/project/project-info.conf @@ -3,7 +3,7 @@ project-info { labels: "https://github.com/akka/alpakka/labels/p%3A" scaladoc: "https://doc.akka.io/api/alpakka/"${project-info.version}"/akka/stream/alpakka/" shared-info { - jdk-versions: ["Adopt OpenJDK 8", "Adopt OpenJDK 11"] + jdk-versions: ["Eclipse Temurin JDK 11", "Eclipse Temurin JDK 17"] snapshots: { url: "other-docs/snapshots.html" text: "Snapshots are available"