Skip to content

build(deps): bump Android Gradle Plugin to 9.3.0 on JDK 21 only#443

Merged
tony19 merged 1 commit into
mainfrom
claude/merge-dependabot-prs-qfq42j
Jul 19, 2026
Merged

build(deps): bump Android Gradle Plugin to 9.3.0 on JDK 21 only#443
tony19 merged 1 commit into
mainfrom
claude/merge-dependabot-prs-qfq42j

Conversation

@tony19

@tony19 tony19 commented Jul 19, 2026

Copy link
Copy Markdown
Owner

Summary

Adopts Android Gradle Plugin 9.3.0, but only on the JDK 21 build leg — superseding Dependabot's #438, which bumped AGP to 9.3.0 unconditionally and broke the JDK 17 CI build.

Why #438 fails

AGP 9.3.0's bundled Android Lint calls java.util.List.removeLast() — a method added to List in JDK 21 (SequencedCollection). Under JDK 17 that method doesn't exist, so ./gradlew lint crashes:

> Task :logback-android:lintAnalyzeJdk11Debug FAILED
  Unexpected failure during lint analysis (this is a bug in lint or one of the libraries it depends on)
  Message: 'java.lang.Object java.util.List.removeLast()'
  ... NoSuchMethodError ... BidirectionalTextDetector

Build (JDK 21) passed; only Build (JDK 17) failed, and only at the lint step (assemble, bytecode verification, and unit tests all pass under JDK 17 + AGP 9.3.0).

Approach

Keep JDK 17 coverage by making the AGP version a Gradle property instead of dropping the JDK 17 matrix leg:

  • build.gradle — buildscript classpath reads com.android.tools.build:gradle:${agpVersion}
  • gradle.propertiesagpVersion defaults to 9.2.1 (the JDK-17-compatible version; also what the JDK-17 test_app publish step uses)
  • .github/workflows/build.yml — the build matrix sets agp per leg (17 → 9.2.1, 21 → 9.3.0) and exports ORG_GRADLE_PROJECT_agpVersion, overriding the default only on the JDK 21 leg

Net effect: JDK 17 builds/lints/tests on AGP 9.2.1; JDK 21 exercises AGP 9.3.0. No JDK coverage is dropped.

Test plan

  • Build (JDK 17) green on AGP 9.2.1
  • Build (JDK 21) green on AGP 9.3.0 (lint included)
  • Test App green (JDK 17, default AGP 9.2.1)

Closes #438.


Generated by Claude Code

Supersedes #438. AGP 9.3.0's bundled lint calls java.util.List.removeLast()
(a JDK 21 SequencedCollection API), so `./gradlew lint` crashes with
NoSuchMethodError under JDK 17 while passing under JDK 21.

Rather than drop JDK 17 coverage, parameterize the AGP version:
- build.gradle reads it from the `agpVersion` Gradle property
- gradle.properties defaults it to 9.2.1 (keeps JDK 17, and the JDK-17
  test_app publish step, building on the plugin that supports JDK 17)
- the build workflow overrides it to 9.3.0 only on the JDK 21 matrix leg
  via ORG_GRADLE_PROJECT_agpVersion

JDK 17 continues to build/lint/test on AGP 9.2.1; JDK 21 exercises 9.3.0.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KxmJDWq6wgCEimH3tGLF5H
@tony19
tony19 marked this pull request as ready for review July 19, 2026 07:12
@tony19
tony19 merged commit b9e6638 into main Jul 19, 2026
7 of 9 checks passed
@tony19
tony19 deleted the claude/merge-dependabot-prs-qfq42j branch July 19, 2026 07:12
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.

2 participants