Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Drop JDK 8 #3017

Merged
merged 2 commits into from
Oct 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 2 additions & 28 deletions .github/workflows/check-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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'
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
7 changes: 7 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
4 changes: 2 additions & 2 deletions project/Common.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this problem remains
the ci release job is setup with 11

// "8"
// "11"
),
compile / javacOptions ++= (scalaVersion.value match {
case Dependencies.Scala213 if insideCI.value && fatalWarnings.value && !Dependencies.CronBuild =>
Expand Down
2 changes: 1 addition & 1 deletion project/project-info.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading