Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

Set Kotlin module name to fix library conflict #101

Merged
merged 1 commit into from
Mar 16, 2021
Merged

Set Kotlin module name to fix library conflict #101

merged 1 commit into from
Mar 16, 2021

Conversation

kdrag0n
Copy link
Contributor

@kdrag0n kdrag0n commented Mar 16, 2021

By default, the Kotlin compiler creates a kotlin_module file with the name of the Gradle module. The resulting name is library_release.kotlin_module for this library, which conflicts with other libraries that also use the default generic "library" name. This causes builds to fail when multiple such libraries are used in the same project:

> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > More than one file was found with OS independent path 'META-INF/library_release.kotlin_module'.

Set a unique Kotlin module name to fix the issue.

By default, the Kotlin compiler creates a kotlin_module file with the
name of the Gradle module. The resulting name is
"library_release.kotlin_module" for this library, which conflicts with
other libraries that also use the default generic "library" name. This
causes builds to fail when multiple such libraries are used in the same
project:

> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > More than one file was found with OS independent path 'META-INF/library_release.kotlin_module'.

Set a unique Kotlin module name to fix the issue.
@kdrag0n
Copy link
Contributor Author

kdrag0n commented Mar 16, 2021

The CI failure doesn't appear to be related to this change.

@chrisbanes
Copy link
Owner

Interesting, TIL! Thanks for the PR

@chrisbanes chrisbanes merged commit 2724d46 into chrisbanes:main Mar 16, 2021
@kdrag0n kdrag0n deleted the kotlin-module-name branch March 16, 2021 18:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants