Skip to content

Commit 5e493bd

Browse files
chore(build): Compile with a JDK 21 toolchain and upgrade Mockito and Error Prone (#6242)
* build: Switch to JDK 21 and upgrade Mockito, Robolectric and Error Prone * build: Compile tests for JDK 21 and fix buildSrc JVM target * build: Compile with a JDK 21 toolchain from a build-logic convention plugin * docs(kafka): Explain the explicit double cast at the latency call site * build: Compile the samples and their tests with the toolchain JDK * Format code * build: Drop the now-unused JvmTarget imports from the samples * build: Clarify the jvm-targets plugin comments and rename its helper * build: Require JDK 21 to run Gradle again * build: Keep the Spring Boot 2 sample apps on their published bytecode level * ci: Drop the stale Java version from the build job name * build: Keep Robolectric at 4.15 and leave its test environment untouched * build: Move the Java 8 release pin into the jvm-targets convention plugin * build: Drop the Error Prone and NullAway code fixes, they move to their own PR * ci: Drop the stale Java version from the build job name * fix(core): Suppress the new Error Prone and javac 21 findings in the sentry module * fix(core): Resolve the remaining Error Prone and javac 21 findings in the sentry module * build: Move the JDK and bytecode level decisions into the io.sentry.compilation plugin * Address PR comments * test(android): Make the flush timeout verifies match the real log call * chore(core): Reword the JDK 21 suppression comments * build: Keep only the javac unit test targets inside afterEvaluate * build: Drop afterEvaluate, pin the Kotlin API level and rename the convention plugin * Fix JDK 21 findings in sentry-android-core (#6261) Fix JDK 21 findings in sentry-android-core * Fix JDK 21 findings in the Spring modules (#6260) * Fix JDK 21 findings in the JVM integrations (#6259) * fix multiplatform target compilations --------- Co-authored-by: Sentry Github Bot <bot+github-bot@sentry.io>
1 parent 8d7b785 commit 5e493bd

188 files changed

Lines changed: 514 additions & 540 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/agp-matrix.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
uses: actions/setup-java@b843ebf9b913146b38da2eaa7aeddf76074ae1ad # v6.1.0
3737
with:
3838
distribution: 'temurin'
39-
java-version: '17'
39+
java-version: '21'
4040

4141
- name: Setup Gradle
4242
uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0

‎.github/workflows/build.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ concurrency:
1212
jobs:
1313
build:
1414
# Job name is a required status check in the main branch ruleset; keep it stable.
15-
name: Build Job ubuntu-latest - Java 17
15+
name: Build Job ubuntu-latest
1616
runs-on: ubuntu-latest
1717

1818
env:
@@ -29,7 +29,7 @@ jobs:
2929
uses: actions/setup-java@b843ebf9b913146b38da2eaa7aeddf76074ae1ad # v6.1.0
3030
with:
3131
distribution: 'temurin'
32-
java-version: '17'
32+
java-version: '21'
3333

3434
# Workaround for https://github.com/gradle/actions/issues/21 to use config cache
3535
- name: Cache buildSrc

‎.github/workflows/codeql-analysis.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
uses: actions/setup-java@b843ebf9b913146b38da2eaa7aeddf76074ae1ad # v6.1.0
2929
with:
3030
distribution: 'temurin'
31-
java-version: '17'
31+
java-version: '21'
3232

3333
- name: Setup Gradle
3434
uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0

‎.github/workflows/enforce-license-compliance.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
uses: actions/setup-java@b843ebf9b913146b38da2eaa7aeddf76074ae1ad # v6.1.0
1818
with:
1919
distribution: 'temurin'
20-
java-version: '17'
20+
java-version: '21'
2121

2222
- name: Checkout
2323
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

‎.github/workflows/format-code.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
uses: actions/setup-java@b843ebf9b913146b38da2eaa7aeddf76074ae1ad # v6.1.0
1717
with:
1818
distribution: 'temurin'
19-
java-version: '17'
19+
java-version: '21'
2020

2121
- name: Setup Gradle
2222
uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0

‎.github/workflows/generate-javadocs.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
uses: actions/setup-java@b843ebf9b913146b38da2eaa7aeddf76074ae1ad # v6.1.0
1818
with:
1919
distribution: 'temurin'
20-
java-version: '17'
20+
java-version: '21'
2121

2222
- name: Setup Gradle
2323
uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0

‎.github/workflows/integration-tests-macrobenchmark.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
uses: actions/setup-java@b843ebf9b913146b38da2eaa7aeddf76074ae1ad # v6.1.0
2727
with:
2828
distribution: 'temurin'
29-
java-version: '17'
29+
java-version: '21'
3030

3131
- name: Setup Gradle
3232
uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0

‎.github/workflows/integration-tests-size.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
uses: actions/setup-java@b843ebf9b913146b38da2eaa7aeddf76074ae1ad # v6.1.0
2727
with:
2828
distribution: "temurin"
29-
java-version: "17"
29+
java-version: "21"
3030

3131
# Workaround for https://github.com/gradle/actions/issues/21 to use config cache
3232
- name: Cache buildSrc

‎.github/workflows/integration-tests-ui-critical.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
uses: actions/setup-java@b843ebf9b913146b38da2eaa7aeddf76074ae1ad # v6.1.0
3434
with:
3535
distribution: 'temurin'
36-
java-version: '17'
36+
java-version: '21'
3737

3838
- name: Setup Gradle
3939
uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0

‎.github/workflows/integration-tests-ui.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
uses: actions/setup-java@b843ebf9b913146b38da2eaa7aeddf76074ae1ad # v6.1.0
3131
with:
3232
distribution: 'temurin'
33-
java-version: '17'
33+
java-version: '21'
3434

3535
- name: Setup Gradle
3636
uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0

0 commit comments

Comments
 (0)