Skip to content

ADFA-2602: Correct version references in plugin docs and metadata comments - #1648

Open
Daniel-ADFA wants to merge 4 commits into
task/ADFA-2602-toolchain-agp9from
task/ADFA-2602-doc-version-refs
Open

ADFA-2602: Correct version references in plugin docs and metadata comments#1648
Daniel-ADFA wants to merge 4 commits into
task/ADFA-2602-toolchain-agp9from
task/ADFA-2602-doc-version-refs

Conversation

@Daniel-ADFA

Copy link
Copy Markdown
Contributor

PLUGIN_AUTHORING.md told plugin authors to request AGP 8.11.0 and Kotlin
1.9.22 for an on-device build. The harvested localMvnRepository now ships
AGP 9.3.1 and Kotlin 2.3.21, so those instructions produced an
unresolvable build.

The apiVersion/languageVersion pins in common, eventbus-events,
idetooltips and plugin-api stay at 2.0. Their comments named 1.9.22 as the
reason, which no longer holds; the real invariant is that the jar must stay
readable by every supported on-device compiler, including a device still on
an older bundled toolchain after a KOTLIN_VERSION bump. Reworded to say
that instead of naming a version that will keep going stale.


Stack created with GitHub Stacks CLIGive Feedback 💬

…ments

PLUGIN_AUTHORING.md told plugin authors to request AGP 8.11.0 and Kotlin
1.9.22 for an on-device build. The harvested localMvnRepository now ships
AGP 9.3.1 and Kotlin 2.3.21, so those instructions produced an
unresolvable build.

The apiVersion/languageVersion pins in common, eventbus-events,
idetooltips and plugin-api stay at 2.0. Their comments named 1.9.22 as the
reason, which no longer holds; the real invariant is that the jar must stay
readable by every supported on-device compiler, including a device still on
an older bundled toolchain after a KOTLIN_VERSION bump. Reworded to say
that instead of naming a version that will keep going stale.
@Daniel-ADFA
Daniel-ADFA marked this pull request as ready for review August 11, 2026 13:58

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.

Tip: disable this comment in your organization's Code Review settings.

Comment thread docs/PLUGIN_AUTHORING.md Outdated
…ions

The on-device localMvnRepository ships AGP 9.3.1, Gradle 9.6.1 and Kotlin 2.3.21,
not AGP 8.13.1 / Kotlin 2.3.0. AGP 9 also refuses org.jetbrains.kotlin.android and
takes its compiler from the kotlin-gradle-plugin jar on the root buildscript
classpath, so the documented root snippet would have failed to configure.

Name the constants that pin these versions, so the doc stops going stale on every
bump rather than being corrected after the fact.
AGP 9.3.1 hard-requires build-tools >= 36.0.0, so `BUILD_TOOLS_VERSION` moves to
36.0.0. This drives `BUILD_TOOLS_DIR` and therefore the
`android.aapt2FromMavenOverride` path that GradleBuildService passes to every
build.

This must land together with an asset that actually contains
`build-tools/36.0.0`; on its own it points the IDE at a directory that does not
exist yet. The matching dev-assets pipeline change and the platform-tools port
that builds those binaries from android-16.0.0_r4 are the other two pieces.

Also drop the build-tools version from the suppressed aapt2 warning. That entry
is matched with `contains()` against the full override path, so pinning 35.0.0
meant the bump would silently stop matching and resurface an experimental-option
warning in Build Output on every user build.

Claude-Session: https://claude.ai/code/session_017HGpMsUzZ5wxCfMtDZ2HGP
Offline builds failed unless the user turned on the --offline flag, which
defeats the point of an offline-first IDE.

The on-device repo was registered last. Templates declare gradlePluginPortal(),
google() and mavenCentral() first, and this plugin appended with
`maven { it.url = uri }`. With no network, dl.google.com fails DNS, and Gradle
treats a repository *error* as fatal rather than falling through to the next
repository the way it does for a 404. Resolution therefore died at google() and
never reached the local repo. --offline worked only because it skips remote
repositories entirely.

The artifacts were never missing: the AGP plugin marker,
kotlin-build-tools-compat and kotlin-build-tools-impl are all present in
localMvnRepository on device.

Inserting at index 0 instead of appending fixes all four injection points
(pluginManagement, dependencyResolutionManagement, and the settings and project
buildscript blocks).

Verified on a Pixel 9 Pro emulator in airplane mode with offlineMode=false, the
Gradle modules-2 cache deleted, and a brand new Empty Activity Kotlin project
whose settings.gradle.kts was left untouched: sync reaches "Project initialized"
and the build produces app-debug.apk. Both failed under identical conditions
before this change. A warm module cache masks the bug, so retests need the cache
cleared.

Ships in the APK, not the assets zip, so no asset rebuild is required.

Claude-Session: https://claude.ai/code/session_017HGpMsUzZ5wxCfMtDZ2HGP
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.

4 participants