Skip to content

Move the Java toolchain and source level to JDK 26 - #65

Merged
trexx merged 1 commit into
masterfrom
chore/jdk-26
Sep 16, 2026
Merged

trexx merged 1 commit into
masterfrom
chore/jdk-26

Conversation

@trexx

@trexx trexx commented Sep 16, 2026

Copy link
Copy Markdown
Owner

Summary

  • Toolchain, sourceCompatibility/targetCompatibility and both CI setup-java steps move from JDK 25 to 26; docs and comments that name the version follow.
  • JaCoCo stays at 0.8.15 — it is the first release with official support for the class-file major version 70 that JDK 26 emits (0.8.14 was experimental). Its comment previously credited 0.8.15 with Java 25 support, which was 0.8.14's; corrected.
  • CLAUDE.md's toolchain line also catches up to the AGP 9.4.0 already in build.gradle.

Why 26 and not 27

JDK 27 went GA on 2026-09-15 and was tested too. It compiles, dexes (R8) and passes the unit tests and JaCoCo, but Android Lint (AGP 9.4.0) cannot read class-file v71: it logs broken class file? (Unsupported class file major version 71) for every class and still reports BUILD SUCCESSFUL with its bytecode checks skipped. That silently disables the lintRelease gate, so the new toolchain comment records the trap for the next bump. Gradle's own matrix also stops at 26.

Verification (local, AGP 9.4.0 / Gradle 9.6.1)

Gate Result
compileDebugJavaWithJavac / compileReleaseJavaWithJavac ✅ class-file major version 70 confirmed
testDebugUnitTest ✅ 314 tests, 0 failures (fresh run, --no-build-cache --rerun-tasks)
jacocoTestReport ✅ real coverage (28 classes / 526 lines), no instrumentation errors
lintRelease ✅ zero Unsupported class file lines
minifyReleaseWithR8 (optimising) ✅
Gradle daemon on JDK 26 (CI's configuration) + tests ✅

Corretto 26 is available for setup-java. Not run locally: assembleRelease (ndk-build) — unaffected by the JDK, and CI covers it.

Latency and performance impact

None. Only the build toolchain changes; R8 desugars the same source to the same API 30 target and no runtime code is touched. Worth one install on the Shield (API 30) as the usual sanity check for a toolchain bump, since desugaring of the new class-file version is the only runtime variable.

🤖 Generated with Claude Code

Bump the toolchain, sourceCompatibility/targetCompatibility and both CI
setup-java steps from 25 to 26, and correct the docs and comments that
name the version. The JaCoCo pin stays at 0.8.15: its comment claimed it
was the first release for Java 25 class files (that was 0.8.14); it is in
fact the first with official support for the major version 70 files JDK 26
emits, so the comment now says that.

26 is as far as the current stack goes. Verified against AGP 9.4.0, Gradle
9.6.1: javac, R8 (debug and optimising release), all 314 unit tests, JaCoCo
and lintRelease pass on JDK 26 output, with the Gradle daemon on both 25
and 26. JDK 27 (GA 2026-09-15) also compiles, dexes and tests, but Android
Lint logs "Unsupported class file major version 71" for every class and
still exits green with its bytecode checks skipped - a silent loss of the
CI gate, so the toolchain comment records that trap for the next bump.

Latency and performance impact: none. Only the build toolchain changes;
R8 desugars the same source to the same API 30 target, and no runtime code
is touched.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@trexx
trexx merged commit b3b10ed into master Sep 16, 2026
2 checks passed
@trexx
trexx deleted the chore/jdk-26 branch September 16, 2026 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant