From 9ce76cb47194365e7d53ac9a13230958777382f7 Mon Sep 17 00:00:00 2001 From: Daniel Alome Date: Mon, 10 Aug 2026 14:48:48 +0100 Subject: [PATCH] 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. --- common/build.gradle.kts | 2 +- docs/PLUGIN_AUTHORING.md | 6 +++--- eventbus-events/build.gradle.kts | 2 +- idetooltips/build.gradle.kts | 2 +- plugin-api/build.gradle.kts | 3 ++- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/common/build.gradle.kts b/common/build.gradle.kts index dc01fac8e9..8ef2d82734 100755 --- a/common/build.gradle.kts +++ b/common/build.gradle.kts @@ -12,7 +12,7 @@ android { kotlin { compilerOptions { // This module's classes ship in the plugin-api coordinate that on-device plugins - // compile against, so emit metadata the on-device Kotlin (1.9.22) can read (<= 2.0.0). + // compile against, so emit metadata every supported on-device Kotlin can read (<= 2.0.0). apiVersion.set(org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_0) languageVersion.set(org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_0) } diff --git a/docs/PLUGIN_AUTHORING.md b/docs/PLUGIN_AUTHORING.md index 7b7d4610fd..a3314398cd 100644 --- a/docs/PLUGIN_AUTHORING.md +++ b/docs/PLUGIN_AUTHORING.md @@ -71,7 +71,7 @@ injected `com.itsaky.androidide.plugins.build` `1.0.0` marker. The `plugins {}` example above uses AGP `8.8.2` / Kotlin `2.1.21` — the versions the dev/CI repo resolves online. A plugin built **on-device** resolves AGP and the Kotlin Gradle plugin from the harvested on-device `localMvnRepository`, which currently ships -only **AGP `8.11.0`** and **Kotlin `1.9.22`**. Request those versions for an on-device +only **AGP `8.13.1`** and **Kotlin `2.3.0`**. Request those versions for an on-device build, or offline resolution of the build plugins fails. Also declare AGP `apply false` in the **root** `build.gradle.kts` (as the standard CoGo @@ -79,8 +79,8 @@ project template does): ```kotlin plugins { - id("com.android.application") apply false version "8.11.0" - id("com.android.library") apply false version "8.11.0" + id("com.android.application") apply false version "8.13.1" + id("com.android.library") apply false version "8.13.1" } ``` diff --git a/eventbus-events/build.gradle.kts b/eventbus-events/build.gradle.kts index ac7acb7999..5bcb9d0cda 100644 --- a/eventbus-events/build.gradle.kts +++ b/eventbus-events/build.gradle.kts @@ -29,7 +29,7 @@ android { kotlin { compilerOptions { // This module's classes ship in the plugin-api coordinate that on-device plugins - // compile against, so emit metadata the on-device Kotlin (1.9.22) can read (<= 2.0.0). + // compile against, so emit metadata every supported on-device Kotlin can read (<= 2.0.0). apiVersion.set(org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_0) languageVersion.set(org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_0) } diff --git a/idetooltips/build.gradle.kts b/idetooltips/build.gradle.kts index 4716486943..98e9d2a70c 100644 --- a/idetooltips/build.gradle.kts +++ b/idetooltips/build.gradle.kts @@ -13,7 +13,7 @@ android { kotlin { compilerOptions { // This module's classes ship in the plugin-api coordinate that on-device plugins - // compile against, so emit metadata the on-device Kotlin (1.9.22) can read (<= 2.0.0). + // compile against, so emit metadata every supported on-device Kotlin can read (<= 2.0.0). apiVersion.set(org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_0) languageVersion.set(org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_0) } diff --git a/plugin-api/build.gradle.kts b/plugin-api/build.gradle.kts index a7943ce23c..f0e7b94eb7 100644 --- a/plugin-api/build.gradle.kts +++ b/plugin-api/build.gradle.kts @@ -22,7 +22,8 @@ android { kotlin { compilerOptions { jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17) - // Emit metadata the on-device Kotlin compiler (1.9.22) can read (<= 2.0.0). + // Emit metadata every supported on-device Kotlin compiler can read (<= 2.0.0), so a + // device still on an older bundled toolchain keeps working after a KOTLIN_VERSION bump. // This jar ships in the plugin-api coordinate on-device plugins compile against. apiVersion.set(org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_0) languageVersion.set(org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_0)