Skip to content

build: Compile the SDK for Java 11 - #6459

Open
runningcode wants to merge 6 commits into
9.x.xfrom
no/java-660-bump-java-compile-sdk-to-11
Open

runningcode wants to merge 6 commits into
9.x.xfrom
no/java-660-bump-java-compile-sdk-to-11

Conversation

@runningcode

@runningcode runningcode commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

📜 Description

This raises the min java needed to 11. (was 8 before). Java 8 is deprecated so its time to stop supporting it.

We also remove the java 8 api signature check and the animalsniffer from jvm only modules.

💡 Motivation and Context

v9 is a major release, so it's where we raise the minimum Java version from 8 to 11.

  • resolves: JAVA-660

💚 How did you test it?

Tests pass

📝 Checklist

  • I added GH Issue ID & Linear ID
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.
  • Public API changes reviewed by another Mobile SDK team member or implemented according to the develop docs spec.

🔮 Next steps

🤖 Generated with Claude Code

AGP 9 defaults compileOptions to Java 11. The published Android libraries now emit Java 11
bytecode for both Java and Kotlin instead of Java 8. The JVM modules, sentry included, keep
publishing Java 8 bytecode so that Java 8 backends can still use them.

Fixes JAVA-660

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@linear-code

linear-code Bot commented Nov 4, 2026

Copy link
Copy Markdown

JAVA-660

@sentry

sentry Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App Name App ID Version Configuration
SDK Size io.sentry.tests.size 8.62.0 (1) release

⚙️ sentry-android Build Distribution Settings

runningcode and others added 2 commits November 4, 2026 16:17
Extend the Java 11 target to the JVM modules, so every published module now emits Java 11
bytecode and the SDK no longer runs on Java 8. Modules that already targeted Java 17 are
unchanged. The samples that pinned Java 8 move to Java 11 with the SDK.

Refs JAVA-660

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@runningcode runningcode changed the title build(android): Compile the Android modules for Java 11 build: Compile the SDK for Java 11 Nov 4, 2026
runningcode and others added 2 commits November 4, 2026 16:25
With Java 11 as the minimum, the Java 8 signature only blocked APIs the SDK may now use.
javac's release flag and Kotlin's -Xjdk-release already limit main code to the Java 11 API, so
the JVM-only modules no longer apply animal sniffer. The modules that Android apps also use keep
checking against the Android API 21 signature.

Refs JAVA-660

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@runningcode
runningcode marked this pull request as ready for review November 4, 2026 15:33
@runningcode runningcode added the ship-it PR is ready to merge from a reviewer perspective label Nov 4, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ship-it PR is ready to merge from a reviewer perspective

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant