I update koin android from 3.3.3 to 3.5.0 and got ...
# koin
g
I update koin android from 3.3.3 to 3.5.0 and got a compilation error related to dexing. Anyone got the same issue? The full stacktrace can be found in the attached file
Copy code
* What went wrong:
Execution failed for task ':main:mergeExtDexDevelopmentDebug'.
> Could not resolve all files for configuration ':main:developmentDebugRuntimeClasspath'.
   > Failed to transform koin-core-jvm-3.5.0.jar (io.insert-koin:koin-core-jvm:3.5.0) to match attributes {artifactType=android-dex, asm-transformed-variant=NONE, dexing-enable-desugaring=true, dexing-enable-jacoco-instrumentation=false, dexing-is-debuggable=true, dexing-min-sdk=24, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime, org.jetbrains.kotlin.platform.type=jvm}.
      > Execution failed for DexingNoClasspathTransform: /Users/giangpham/.gradle/caches/modules-2/files-2.1/io.insert-koin/koin-core-jvm/3.5.0/1a9d0112ee949346edb5cbff25d31385be9e940a/koin-core-jvm-3.5.0.jar.
         > Error while dexing.

* Try:
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
maybe because koin core 3.5.0 is missing from maven?
a
ya, what's up with that?
a
I'm checking
g
now that koin core is available, I still have the same error about dexing 🤔 not sure what happen here @arnaud.giuliani
Copy code
Execution failed for task ':main:mergeExtDexDevelopmentDebug'.
> Could not resolve all files for configuration ':main:developmentDebugRuntimeClasspath'.
   > Failed to transform koin-androidx-compose-3.5.0.aar (io.insert-koin:koin-androidx-compose:3.5.0) to match attributes {artifactType=android-dex, asm-transformed-variant=NONE, dexing-enable-desugaring=true, dexing-enable-jacoco-instrumentation=false, dexing-is-debuggable=true, dexing-min-sdk=24, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-runtime}.
      > Execution failed for DexingNoClasspathTransform: /Users/giangpham/.gradle/caches/transforms-3/423367a4b9c99a310540555e3184b246/transformed/koin-androidx-compose-3.5.0-runtime.jar.
         > Error while dexing.
   > Failed to transform koin-compose-jvm-1.1.0.jar (io.insert-koin:koin-compose-jvm:1.1.0) to match attributes {artifactType=android-dex, asm-transformed-variant=NONE, dexing-enable-desugaring=true, dexing-enable-jacoco-instrumentation=false, dexing-is-debuggable=true, dexing-min-sdk=24, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime, org.jetbrains.kotlin.platform.type=jvm}.
      > Execution failed for DexingNoClasspathTransform: /Users/giangpham/.gradle/caches/modules-2/files-2.1/io.insert-koin/koin-compose-jvm/1.1.0/a1e983040dc35f8349899badf2a8d87b22cbc96/koin-compose-jvm-1.1.0.jar.
         > Error while dexing.
   > Failed to transform koin-core-jvm-3.5.0.jar (io.insert-koin:koin-core-jvm:3.5.0) to match attributes {artifactType=android-dex, asm-transformed-variant=NONE, dexing-enable-desugaring=true, dexing-enable-jacoco-instrumentation=false, dexing-is-debuggable=true, dexing-min-sdk=24, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime, org.jetbrains.kotlin.platform.type=jvm}.
      > Execution failed for DexingNoClasspathTransform: /Users/giangpham/.gradle/caches/modules-2/files-2.1/io.insert-koin/koin-core-jvm/3.5.0/1a9d0112ee949346edb5cbff25d31385be9e940a/koin-core-jvm-3.5.0.jar.
         > Error while dexing.
a
don't see if it's a cache issue or a broken build metadata 🤔 can you try with koin 3.4.3 & koin-androidx-compose 3.4.5
g
these versions work, but we can't use them as they have a bug that affects us
a
curious thing is koin-core metadata haven't changed 🤔
but koin-android build config yes
can you trash your cache to retest?
g
I have done that a few times now 😄 it keeps happening
a
argh 💩
Need to reproduce that on an other app
Confetti seems to compile with 3.5
retrying ...
g
is there any requirement for koin 3.5.0, ie. kotlin 1.9.0 or agp 8.0.0, we don't have them in place yet, just trying to throw some ideas
a
yes kotlin 1.9
g
ok, we are using 1.8.22, that might be an issue?
a
yes
g
ok thanks
btw, is there any compatibility mapping documented somewhere 😅
a
in the changelog and release note, indicates kotlin 1.9
but it's curious than you have such dexing problem, perhaps you have something else not supported in kotlin 1.9 🤔 ?
g
you mean why can't I update to Kotlin 1.9?
a
yes
let me check on update an update on project using 1.8.20. But impact are more wide than kotlin 1.9 there is also new android lib udpate
g
that's a complicated story 😅 We use compose in our project, in order to use kotlin 1.9, we need the compose kotlin compiler version to be 1.5.0+ However, that seems to require us to use compileSdk 34, which suggests us to upgrade to AGP 8.0+ (it says that sdk 34 wasn't tested with AGP 7.4 even tho it allows that) Sadly, some 3rd party SDKs aren't ready for the breaking changes of AGP 8.0, so we are still there with AGP 7.4 & kotlin 1.8.22
but I tested, kotlin 1.9.0, AGP 8 & compose kotlin compiler 1.5.0 plays well with koin 3.5.0, so we just need to wait unfortunately 😭
a
not sure to be in AGP 8 on my side
g
yeah, if you don't have compose then it's fine
actually, even if you have compose, AGP 7.4 stills work with compileSdk 34, it's just that there is a warning saying that it isn't recommended as this combination isn't tested yet. We are playing safe on our side
a
ok
then kotlin 1.9 + koin 3.5 works?
with current AGP 7.3
g
yup, I can confirm that
👍 1
347 Views