From 546095b02616b1e6a8be4833656a95b4cdc4727c Mon Sep 17 00:00:00 2001 From: Kgothatso Ngako Date: Fri, 4 Sep 2026 22:58:32 +0200 Subject: [PATCH] build: unify the composite on AGP 9.4.0 so Android Studio can sync Android Studio refused to sync the project after the lightning-kmp-app bump in 4e939c4: Using multiple versions of the Android Gradle Plugin [9.1.1, 9.4.0] across Gradle builds is not allowed. Affected builds: [:, :lightning-kmp-app:lightning-kmp:bitcoin-kmp:secp256k1-kmp] A composite build has to settle on a single AGP version across every build that applies the plugin. Four builds in this tree do: : 9.1.1 version catalog :lightning-kmp-app 9.1.1 version catalog :secp256k1-frost-kmp 9.1.1 version catalog :lightning-kmp-app:lightning-kmp:bitcoin-kmp:secp256k1-kmp 9.4.0 hardcoded lightning-kmp and bitcoin-kmp apply no android plugin at all, which is why the message names only the two ends of the chain rather than everything between them. secp256k1-kmp pins 9.4.0 twice -- a buildscript classpath entry, and a pluginManagement resolutionStrategy that rewrites every requested com.android plugin to that version -- so it cannot be talked out of it from here. The three catalogs move up to meet it. Pinning it down to 9.1.1 instead would mean editing a build four submodules deep and then committing in bitcoin-kmp and lightning-kmp purely to carry the pointer, for no gain. Moving up is also the direction the chain already set: bbba08b's f22c30a moved every build in it onto Gradle 9.7.1 for the same reason, and 4e939c4 followed. Submodule commits carried here: lightning-kmp-app bbba08b -> ce1ed01 build: move to AGP 9.4.0, matching the version the submodule chain pins secp256k1-frost-kmp d3b294d -> 80a55b7 build: move to AGP 9.4.0 to match the rest of mantra-kmp's composite Both sit on branches (build/agp-9.4.0 and build/gate-ios-targets-on-macos) rather than their masters, and neither is pushed yet, so a fresh clone cannot resolve these two pointers until they are. 9.4.0 is a minor bump inside the AGP 9.x line, so the DSL is unchanged and every android.* flag in gradle.properties -- newDsl, builtInKotlin, the r8 settings -- keeps its meaning. `:composeApp:compileDebugKotlinAndroid` passes clean. Note that this is only what the IDE needs to sync, not everything worth knowing about the chain. bitcoin-kmp's settings.gradle.kts substitutes secp256k1-kmp, -jni-jvm and the three -jni-jvm-{linux,darwin,mingw} coordinates, but not -jni-android. So the android app still resolves secp256k1-kmp-jni-android from maven central at stock 0.24.0, without the FROST/prefractal native modules the threshold branch exists to provide, and a call into those from android would fail with UnsatisfiedLinkError. Fixing that needs a substitution rule in bitcoin-kmp. Untouched here because it is a runtime concern, not a sync one. Co-Authored-By: Claude Opus 5 --- gradle/libs.versions.toml | 2 +- lightning-kmp-app | 2 +- secp256k1-frost-kmp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 49cd4a83..102aff9f 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,5 +1,5 @@ [versions] -agp = "9.1.1" +agp = "9.4.0" android-compileSdk = "37" android-minSdk = "26" android-targetSdk = "37" diff --git a/lightning-kmp-app b/lightning-kmp-app index bbba08b1..ce1ed010 160000 --- a/lightning-kmp-app +++ b/lightning-kmp-app @@ -1 +1 @@ -Subproject commit bbba08b1224631d23768b6f5b044eca2f77518b6 +Subproject commit ce1ed010339bfe9b3073b0b0c84b7ccd6954fe79 diff --git a/secp256k1-frost-kmp b/secp256k1-frost-kmp index d3b294d4..80a55b74 160000 --- a/secp256k1-frost-kmp +++ b/secp256k1-frost-kmp @@ -1 +1 @@ -Subproject commit d3b294d4c5aab519bc91c2e2008dea223ae8b5cf +Subproject commit 80a55b7449a949e65d54df38c5c24659ee757fc0