Skip to content

fix: make AGP 9.5 generated projects assemble on JDK 17 - #516

Merged
cdsap merged 2 commits into
mainfrom
fix/agp-9.5-lint-toolchain
Oct 29, 2026
Merged

cdsap merged 2 commits into
mainfrom
fix/agp-9.5-lint-toolchain

Conversation

@cdsap

@cdsap cdsap commented Oct 29, 2026

Copy link
Copy Markdown
Owner

Summary

  • Bumps generated Android projects to AGP 9.5.0 (same change as chore(deps): update dependency com.android.tools.build:gradle to v9.5.0 #515).
  • AGP 9.5 cannot store the configuration cache when Gradle runs on Java 17 and the project targets Java 21. Lint now requires the executing JVM to match targetCompatibility.
  • Generated app/library convention plugins now set android.lint.toolchain.languageVersion to the project JDK on AGP 9.5+, which is the workaround AGP documents for this mismatch.

Supersedes #515.

Test plan

  • CompositeBuildPluginAndroidLintToolchainTest (emits toolchain on 9.5, not on 9.4)
  • :project-generator:unitTest
  • Agp9NewDslDiVariantsE2EValidationTest on JDK 17 (assembleDebug --configuration-cache for HILT and NONE)
  • CI e2e matrix on this PR, especially Agp9NewDslDiVariantsE2EValidationTest / JDK 17

renovate Bot and others added 2 commits October 28, 2026 18:47
AGP 9.5 cannot store the configuration cache when Gradle runs on an
older JVM than the generated Android target compatibility. Point Lint
at the project toolchain so JDK 17 can still assemble JDK 21 projects.
@cdsap
cdsap merged commit 25fa142 into main Oct 29, 2026
14 checks passed
@cdsap
cdsap deleted the fix/agp-9.5-lint-toolchain branch October 29, 2026 22:59
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