Hi Koin team :wave: I’m currently working on a Ko...
# koin
c
Hi Koin team 👋 I’m currently working on a Kotlin Multiplatform (KMP) project using the following versions:
Koin: 4.1.0-RC1
Koin Annotations: 2.0.1-RC1
Kotlin: 2.1.21
Compose Multiplatform: 1.8.1
KSP: 2.1.21-2.0.1
Here are the dependencies involved:
[libraries]
koin-core = { module = "io.insert-koin:koin-core", version.ref = "koin" }
koin-annotations = { module = "io.insert-koin:koin-annotations", version.ref = "koinAnnotations" }
koin-ksp-compiler = { module = "io.insert-koin:koin-ksp-compiler", version.ref = "koinAnnotations" }
koin-android = { module = "io.insert-koin:koin-android", version.ref = "koin" }
koin-compose = { module = "io.insert-koin:koin-compose", version.ref = "koin" }
koin-compose-viewmodel = { module = "io.insert-koin:koin-compose-viewmodel", version.ref = "koin" }
This is my Gradle setup:
implementation(libs.koin.core)
implementation(libs.koin.compose)
implementation(libs.koin.compose.viewmodel)
api(libs.koin.annotations)
I’m encountering an issue during build related to duplicate classes, and I believe it’s a conflict between koin-annotations and koin-core-annotations. Here’s the actual error message:
A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
> Duplicate class org.koin.core.annotation.InjectedParam found in modules koin-annotations-jvm-2.0.1-RC1.jar -> koin-annotations-jvm-2.0.1-RC1 (io.insert-koin:koin-annotations-jvm:2.0.1-RC1) and koin-core-annotations-jvm-4.1.0-RC1.jar -> koin-core-annotations-jvm-4.1.0-RC1 (io.insert-koin:koin-core-annotations-jvm:4.1.0-RC1)
Duplicate class org.koin.core.annotation.Provided found in modules koin-annotations-jvm-2.0.1-RC1.jar -> koin-annotations-jvm-2.0.1-RC1 (io.insert-koin:koin-annotations-jvm:2.0.1-RC1) and koin-core-annotations-jvm-4.1.0-RC1.jar -> koin-core-annotations-jvm-4.1.0-RC1 (io.insert-koin:koin-core-annotations-jvm:4.1.0-RC1)
It seems like there’s a conflict between koin-annotations and koin-core-annotations jars. Is there a recommended way to avoid this duplication? Should I be aligning versions differently or excluding one of the modules manually? Any guidance on how to cleanly resolve this in a KMP setup would be greatly appreciated 🙏 Thanks again for all your great work on Koin!
👀 1
a
there is current a conflict between Koin Annotations 2.0 and Koin 4.1. We will open quickly Koin Annotations 2.1 to solve that confilict 🙏
👍 1
c
Thank you so much for the quick response and for confirming the issue. I really appreciate the transparency and the plan to release Koin Annotations 2.1 to address the conflict with Koin 4.1. Looking forward to the update—thanks again for the great work and support!
👍 1
g
@Cleveland Shaw There is this bug about the issue: https://github.com/InsertKoinIO/koin-annotations/issues/275
c
@Guyaume Tremblay Thanks for the quick reply and for sharing the issue link 🙏. I’ve subscribed to the GitHub issue to stay updated. Appreciate the support and looking forward to the fix in the upcoming Koin Annotations release. Let me know if there’s anything I can help test or verify.
g
@arnaud.giuliani Sorry to bother you but do you have an ETA about a fix for this please?
a
will open soon 2.1 Beta 👍 Next week
💙 1
thank you color 1
gratitude merci 1