From 80b89a96dc9acef06132f58e320e401b0ff3080b Mon Sep 17 00:00:00 2001 From: Ishaan Jain Date: Wed, 29 Jul 2026 14:30:19 +0530 Subject: [PATCH] Align toolchain and shared runtime deps with kulu-kmp / android app Fixes a NoSuchMethodError that crashed the android debug app when the Ktor Monitor transaction detail screen composed: java.lang.NoSuchMethodError: No static method access$koinInject$lambda-0(...) in class Lorg/koin/compose/InjectKt; at ...TransactionSectionKt$TransactionSection$$inlined$koinInject$1 koinInject is an inline function, so koin-compose 4.0.0's body - including its reference to a private synthetic accessor - was baked into this library's bytecode. The app resolves koin 4.2.2 (Gradle resolves version conflicts upwards), and 4.2.2's InjectKt has no such synthetic, so the call fails at runtime. Nothing catches this at compile time. Align every shared runtime dependency with what the app actually resolves, so no conflict-resolution upgrade happens at all: koin 4.0.0 -> 4.2.2 ktor 3.0.1 -> 3.5.1 coil 3.0.4 -> 3.5.0 kotlinx-serialization 1.9.0 -> 1.11.0 kotlinx-coroutines 1.10.2 -> 1.11.0 kotlinx-datetime 0.6.0 -> 0.8.0-0.6.x-compat okhttp 5.3.2 -> 5.4.0 activity-compose 1.9.3 -> 1.13.0 core-ktx 1.15.0 -> 1.18.0 koin, ktor and serialization publish klibs at metadata 2.3.0, which Kotlin/Native 2.2.21 cannot read, so the toolchain has to move with them. kulu-kmp is already on Kotlin 2.4.0 / Compose 1.11.1, so the pin that previously held this repo at 2.2.0 no longer applies: kotlin 2.2.0 -> 2.4.0 compose-multiplatform 1.8.2 -> 1.11.1 material3 1.8.2 -> 1.9.0 material3 goes to 1.9.0, not 1.11.1: there is no stable 1.11.x, and 1.9.0 is what the Compose Multiplatform 1.11.1 plugin resolves in kulu-kmp. material3-adaptive-navigation-suite stays at 1.8.2 for the same reason. kotlinx-datetime tracks kulu-kmp's 0.8.0-0.6.x-compat, which keeps the 0.6.x API that domain/model/Units.kt uses. It does deprecate that API, so this adds 5 deprecation warnings to be migrated separately. Verified: assembleRelease and compileKotlinIosArm64 pass (iOS was the target that could not compile against the 2.3.0 klibs), publishToMavenLocal succeeds for all targets, the published module metadata declares koin 4.2.2 / ktor 3.5.1 / coil 3.5.0, and the synthetic wrapper class TransactionSectionKt$TransactionSection$$inlined$koinInject$1 present in 1.13.0 is gone from the 1.14.0 artifact. Consumers must be updated in order: publish 1.14.0, bump ktor-monitor in kulu-kmp, then bump kulu-kmp in the android app. Co-Authored-By: Claude Opus 5 --- build.gradle.kts | 2 +- gradle/libs.versions.toml | 35 ++++++++++++++++++++++------------- 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 7dd6a7d2..dca60bd2 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -15,7 +15,7 @@ plugins { allprojects { group = "robustrade" - version = "1.13.0" + version = "1.14.0" } subprojects { diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index b6e5c298..904e2ee1 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,39 +1,48 @@ [versions] # Toolchain pinned to match kulu-kmp (the consumer) so the published # robustrade:ktor-monitor-* artifacts are consumable by kulu-kmp and the android app. -# DO NOT bump kotlin / compose-multiplatform above kulu-kmp's versions (Kotlin 2.2.0 / Compose 1.8.2): +# DO NOT bump kotlin / compose-multiplatform above kulu-kmp's versions (Kotlin 2.4.0 / Compose 1.11.1): # a KMP library must be built with Kotlin <= its consumer, or klib metadata can't be read. +# +# Shared runtime libraries (koin, ktor, coil, coroutines, serialization, datetime, okhttp) MUST match +# the versions the android app resolves. Gradle resolves version conflicts upwards, so publishing +# against an older version does not keep it: the app links this library's bytecode against the +# newer artifact. Where the older API was inlined into this library - koinInject is inline - the +# result is a NoSuchMethodError at runtime that no compile step catches. +# +# kotlinx-datetime tracks kulu-kmp's 0.8.0-0.6.x-compat, the release that keeps the 0.6.x API +# (kotlinx.datetime.Instant) that domain/model/Units.kt still uses. agp = "8.10.0" android-compileSdk = "35" android-minSdk = "21" android-targetSdk = "35" -androidx-activityCompose = "1.9.3" -androidx-core-ktx = "1.15.0" +androidx-activityCompose = "1.13.0" +androidx-core-ktx = "1.18.0" androidx-espresso-core = "3.6.1" androidx-lifecycle = "2.9.0" androidx-test-junit = "1.2.1" accompanist = "0.37.3" compose-adaptive = "1.1.2" -compose-multiplatform = "1.8.2" +compose-multiplatform = "1.11.1" desugar = "2.1.5" junit = "4.13.2" -kotlin = "2.2.0" -kotlinx-coroutines = "1.10.2" +kotlin = "2.4.0" +kotlinx-coroutines = "1.11.0" ksoup = "0.2.5" -ktor = "3.0.1" -okhttp = "5.3.2" +ktor = "3.5.1" +okhttp = "5.4.0" http4k = "6.48.0.0" material3AdaptiveNavigationSuite = "1.8.2" materialIconsExtended = "1.7.3" -material3 = "1.8.2" +material3 = "1.9.0" slf4j = "2.0.18" sqldelight = "2.2.1" sqljs = "1.11.0" webpack = "9.1.0" -koin = "4.0.0" -kotlinx-datetime = "0.6.0" -kotlinx-serialization = "1.9.0" -coil = "3.0.4" +koin = "4.2.2" +kotlinx-datetime = "0.8.0-0.6.x-compat" +kotlinx-serialization = "1.11.0" +coil = "3.5.0" kotlin-atomicfu = "0.29.0" maven-publish = "0.34.0" navigation-event = "1.1.0"