Skip to content

Align toolchain and shared runtime deps with kulu-kmp / android app - #2

Merged
ishaan02-kulu merged 1 commit into
mainfrom
align-versions-with-agp9-upgrade
Jul 29, 2026
Merged

Align toolchain and shared runtime deps with kulu-kmp / android app#2
ishaan02-kulu merged 1 commit into
mainfrom
align-versions-with-agp9-upgrade

Conversation

@ishaan02-kulu

Copy link
Copy Markdown
Collaborator

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.

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 <noreply@anthropic.com>
@ishaan02-kulu
ishaan02-kulu merged commit b65b748 into main Jul 29, 2026
1 check passed
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.

2 participants