InsertKoinIO / koin

Koin - a pragmatic lightweight dependency injection framework for Kotlin & Kotlin Multiplatform
https://insert-koin.io
Apache License 2.0
9.12k stars 721 forks source link

Ktor3 package duplicates with 3.5.6 #2063

Open GazimSoliev opened 4 days ago

GazimSoliev commented 4 days ago

Describe the bug I can't compile andoird app using koin-ktor3, I get checkDebugDuplicateClasses FAILED

To Reproduce Steps to reproduce the behavior:

  1. Create android app
  2. Use koin-ktor3
  3. Create some simple ktor server
  4. Compile it

Expected behavior Compiling without duplicates

Koin module and version: [e.g]: koin-core:4.1.0-Beta1, koin-ktor3:4.1.0-Beta1

GazimSoliev commented 4 days ago
Execution failed for task ':android-service:checkDebugDuplicateClasses'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
   > Duplicate class org.koin.ktor.ext.ApplicationCallExtKt found in modules koin-ktor-4.0.0.jar -> koin-ktor-4.0.0 (io.insert-koin:koin-ktor:4.0.0) and koin-ktor3-4.1.0-Beta1.jar -> koin-ktor3-4.1.0-Beta1 (io.insert-koin:koin-ktor3:4.1.0-Beta1)
     Duplicate class org.koin.ktor.ext.ApplicationCallExtKt$inject$1 found in modules koin-ktor-4.0.0.jar -> koin-ktor-4.0.0 (io.insert-koin:koin-ktor:4.0.0) and koin-ktor3-4.1.0-Beta1.jar -> koin-ktor3-4.1.0-Beta1 (io.insert-koin:koin-ktor3:4.1.0-Beta1)
     Duplicate class org.koin.ktor.ext.ApplicationExtKt found in modules koin-ktor-4.0.0.jar -> koin-ktor-4.0.0 (io.insert-koin:koin-ktor:4.0.0) and koin-ktor3-4.1.0-Beta1.jar -> koin-ktor3-4.1.0-Beta1 (io.insert-koin:koin-ktor3:4.1.0-Beta1)
     Duplicate class org.koin.ktor.ext.ApplicationExtKt$inject$1 found in modules koin-ktor-4.0.0.jar -> koin-ktor-4.0.0 (io.insert-koin:koin-ktor:4.0.0) and koin-ktor3-4.1.0-Beta1.jar -> koin-ktor3-4.1.0-Beta1 (io.insert-koin:koin-ktor3:4.1.0-Beta1)
     Duplicate class org.koin.ktor.ext.RouteExtKt found in modules koin-ktor-4.0.0.jar -> koin-ktor-4.0.0 (io.insert-koin:koin-ktor:4.0.0) and koin-ktor3-4.1.0-Beta1.jar -> koin-ktor3-4.1.0-Beta1 (io.insert-koin:koin-ktor3:4.1.0-Beta1)
     Duplicate class org.koin.ktor.ext.RouteExtKt$inject$1 found in modules koin-ktor-4.0.0.jar -> koin-ktor-4.0.0 (io.insert-koin:koin-ktor:4.0.0) and koin-ktor3-4.1.0-Beta1.jar -> koin-ktor3-4.1.0-Beta1 (io.insert-koin:koin-ktor3:4.1.0-Beta1)
     Duplicate class org.koin.ktor.ext.RoutingExtKt found in modules koin-ktor-4.0.0.jar -> koin-ktor-4.0.0 (io.insert-koin:koin-ktor:4.0.0) and koin-ktor3-4.1.0-Beta1.jar -> koin-ktor3-4.1.0-Beta1 (io.insert-koin:koin-ktor3:4.1.0-Beta1)
     Duplicate class org.koin.ktor.ext.RoutingExtKt$inject$1 found in modules koin-ktor-4.0.0.jar -> koin-ktor-4.0.0 (io.insert-koin:koin-ktor:4.0.0) and koin-ktor3-4.1.0-Beta1.jar -> koin-ktor3-4.1.0-Beta1 (io.insert-koin:koin-ktor3:4.1.0-Beta1)
     Duplicate class org.koin.ktor.plugin.KoinApplicationEventsKt found in modules koin-ktor-4.0.0.jar -> koin-ktor-4.0.0 (io.insert-koin:koin-ktor:4.0.0) and koin-ktor3-4.1.0-Beta1.jar -> koin-ktor3-4.1.0-Beta1 (io.insert-koin:koin-ktor3:4.1.0-Beta1)
     Duplicate class org.koin.ktor.plugin.KoinIsolatedContextPluginKt found in modules koin-ktor-4.0.0.jar -> koin-ktor-4.0.0 (io.insert-koin:koin-ktor:4.0.0) and koin-ktor3-4.1.0-Beta1.jar -> koin-ktor3-4.1.0-Beta1 (io.insert-koin:koin-ktor3:4.1.0-Beta1)
     Duplicate class org.koin.ktor.plugin.KoinPluginKt found in modules koin-ktor-4.0.0.jar -> koin-ktor-4.0.0 (io.insert-koin:koin-ktor:4.0.0) and koin-ktor3-4.1.0-Beta1.jar -> koin-ktor3-4.1.0-Beta1 (io.insert-koin:koin-ktor3:4.1.0-Beta1)
     Duplicate class org.koin.ktor.plugin.KoinPluginKt$setupKoinScope$1 found in modules koin-ktor-4.0.0.jar -> koin-ktor-4.0.0 (io.insert-koin:koin-ktor:4.0.0) and koin-ktor3-4.1.0-Beta1.jar -> koin-ktor3-4.1.0-Beta1 (io.insert-koin:koin-ktor3:4.1.0-Beta1)
     Duplicate class org.koin.ktor.plugin.RequestScope found in modules koin-ktor-4.0.0.jar -> koin-ktor-4.0.0 (io.insert-koin:koin-ktor:4.0.0) and koin-ktor3-4.1.0-Beta1.jar -> koin-ktor3-4.1.0-Beta1 (io.insert-koin:koin-ktor3:4.1.0-Beta1)
arnaudgiuliani commented 3 days ago

why here is it an android app? koin-ktor should be used for backend 🤔

GazimSoliev commented 3 days ago

why here is it an android app? koin-ktor should be used for backend 🤔

Cuz android project has UI written in web