Commit 96e72ca
ADFA-2602: Correct version references in plugin docs and metadata comments (#1648)
* ADFA-2602: Correct version references in plugin docs and metadata comments
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.
* ADFA-2602: Point plugin docs at org.adfa.constants for on-device versions
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.
* ADFA-2602: Point the on-device SDK at build-tools 36.0.0
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
* ADFA-3078: Search the on-device Maven repo before the remote ones
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
---------
Co-authored-by: Daniel Alome <astrocoder007@gmail.com>1 parent bcb5da2 commit 96e72ca
8 files changed
Lines changed: 39 additions & 20 deletions
File tree
- app/src/main/java/com/itsaky/androidide/ui
- common
- src/main/java/com/itsaky/androidide/utils
- docs
- eventbus-events
- gradle-plugin/src/main/java/com/itsaky/androidide/gradle
- idetooltips
- plugin-api
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
518 | 518 | | |
519 | 519 | | |
520 | 520 | | |
521 | | - | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
522 | 525 | | |
523 | 526 | | |
524 | 527 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
70 | 70 | | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
76 | 78 | | |
77 | | - | |
78 | | - | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
79 | 83 | | |
80 | 84 | | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
81 | 91 | | |
82 | | - | |
83 | | - | |
| 92 | + | |
| 93 | + | |
84 | 94 | | |
85 | 95 | | |
86 | 96 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
Lines changed: 8 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
120 | | - | |
121 | | - | |
| 119 | + | |
| 120 | + | |
122 | 121 | | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
123 | 128 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
0 commit comments