Repository navigation
ADFA-6246 | Move the plugins to AGP 9.3.1 / Gradle 9.6.1 / Kotlin 2.3.21 - #108
Merged
Merged
Conversation
….1 / Kotlin 2.3.21 Code On the Go ships AGP 9.3.1, Gradle 9.6.1 and Kotlin 2.3.21 (org.adfa.constants), so the standard these plugins track moves with it. scripts/check-toolchain.sh holds the numbers and gates every PR; its header is re-grounded on CoGo stage c263653bcf. AGP 9 compiles Kotlin itself and refuses org.jetbrains.kotlin.android, so that plugin is dropped from every module and Kotlin is pinned on the buildscript classpath in settings.gradle.kts instead, which is where AGP 9 takes its compiler from. The check also skips the gitignored .cache/ clone that update-libs.sh creates. CI never sees it, but locally it reported dozens of failures against a tree that is not ours to hold to this standard.
…Gradle 9 Gradle 9 turns an undeclared task dependency into a hard error. AI-Literacy-Course and NDK-Installer download their archives into src/main/assets, which more than one task then reads, so ordering only mergeAssets after the download moves the failure to the next consumer rather than fixing it -- the lint model task reads the same directory. Order every other task after the producers instead. mustRunAfter, not dependsOn: a bare assemblePlugin must keep failing loudly on a missing archive rather than quietly fetching 110 MB, which is the behaviour the guard below it exists to enforce. Sketch-to-UI: litert-support:1.0.1 is a 587-byte alias AAR with no classes whose manifest declares the same namespace as litert-support-api, and AGP 9 fails the manifest merge on the duplicate. Depend on litert-support-api, which carries all 75 classes.
The same conversion ADFA-6180 made to the NDK template. PCFExample dropped the
kotlin("android") plugin request AGP 9 refuses, pins the Kotlin stdlib to
KOTLIN_VERSION rather than 1.9.22, and moves jvmTarget off the removed
kotlinOptions DSL.
PCFBuilder's root build was the older shape: a version catalog pinning AGP 8.10.1
and Kotlin 2.0.21 by hand, neither tracking the host. It becomes a .peb on
AGP_VERSION like every other template, so it follows Code On the Go instead of
drifting, and the catalog -- referenced by nothing once the plugin aliases are
gone -- is deleted rather than left as a stale number to grep.
Its wrapper also pinned Gradle 8.11.1 literally; it now takes GRADLE_VERSION.
Project-to-Template rewrote the user's Kotlin plugin line as
kotlin("android") version "${{KOTLIN_VERSION}}", so every template it produced
declared the one plugin AGP 9 refuses. The build stayed green here and broke in
the user's hands, on the generated project.
Drop the line instead, and pin the Kotlin Gradle plugin on the generated root
build's buildscript classpath, matching the core templates and what ADFA-6180
did to the NDK one. The LANGUAGE conditional went with it: it only ever wrapped
that plugin line.
The test asserts on generated file contents, which needs the real org.json --
the android.jar stub returns null under isReturnDefaultValues, which is why the
existing test only exercises the dry-run path. Reverting the fix fails the new
test on exactly its kotlin("android") assertion.
CLAUDE.md still told plugin authors to apply org.jetbrains.kotlin.android, which AGP 9 rejects outright.
jatezzz
approved these changes
Sep 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ADFA-6246
Moves every plugin onto the toolchain Code On the Go ships: AGP 9.3.1, Gradle 9.6.1, Kotlin 2.3.21.
scripts/check-toolchain.shcarries the new standard and gates it.AGP 9 compiles Kotlin itself and refuses
org.jetbrains.kotlin.android, so that plugin is gone from every module and Kotlin is pinned on the buildscript classpath instead.Three things needed more than a version bump:
src/main/assets, and more than one task reads it — orderingmergeAssetsalone just moved the failure to the lint model task.litert-support:1.0.1is an alias AAR with no classes whose manifest duplicateslitert-support-api's namespace, which AGP 9 rejects. Sketch-to-UI now depends on the artifact that actually holds the classes.kotlin("android") version ...into every template it generates, so the breakage landed on the user's generated project, not here. It now drops the line and pins KGP on the generated root buildscript. Regression test added; reverting the fix fails it.PCFBuilder/PCFExample converted the same way ADFA-6180 did the NDK template. PCFBuilder's root build was pinning AGP 8.10.1 / Kotlin 2.0.21 through a hand-written catalog; it is now a
.pebonAGP_VERSION, so it tracks the host.Verified:
assemblePlugingreen for all 29 modulesaddons discover --include-skippedbuilds —cotg-ndkincluded — plus the pebble installer, whichskip.txtholds out of that list. Project-to-Template's unit tests pass.Review by commit: the first is mechanical, the rest are one behavioural change each.