Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate of 'META-INF/kotlinx-coroutines-core.kotlin_module' #1797

Closed
jbruchanov opened this issue Feb 11, 2020 · 5 comments
Closed

Duplicate of 'META-INF/kotlinx-coroutines-core.kotlin_module' #1797

jbruchanov opened this issue Feb 11, 2020 · 5 comments
Labels

Comments

@jbruchanov
Copy link

In android project depending on ktor & coroutines having
More than one file was found with OS independent path 'META-INF/kotlinx-coroutines-core.kotlin_module'

Same files are defined in following deps

org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.3
org.jetbrains.kotlinx:kotlinx-coroutines-core-common:1.3.3

android.packagingOptions pickFirst/exclude helps as workaround

@elizarov
Copy link
Contributor

What AGP version are you using?

@jbruchanov
Copy link
Author

AGP=3.5.3
kotlin=1.3.61

@elizarov
Copy link
Contributor

I cannot reproduce it. How do you add dependency to kotlinx-coroutines to your build? Can you share the reproducer build file?

@jbruchanov
Copy link
Author

jbruchanov commented Feb 12, 2020

quick overview
Project

  • app (depends on android_lib_module1 & android_lib_module2)
  • android_lib_module1 (depends on ktor& droid coroutines)
  • android_lib_module2 (depends on droid coroutines)

both lib_modules released in mavenLocal
app is using them both from mavenLocal

I'll send a repo link later today

both repos have just deps simply as implementation

dependencies {
    implementation "io.ktor:ktor-server-jetty:$ktor"
    implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$kotlin_coroutines"


    ...
}

@elizarov
Copy link
Contributor

I see. That's because of ktor, but I don't think it is possible to prevent a dependency to kotlinx-coroutines-core from appearing in ktor build, so we need to rename the module name for kotlinx-coroutines-common.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants