I'm writing a library to be consumed by an app at work.
When I import the library tot he app, the build fails with:
2 files found with path 'META-INF/DEPENDENCIES'.
I don't want my library to force the consuming app to have to write this in the build.gradle:
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
}
Because that seems like my library isn't configured correctly (i.e. why should the consuming app need to do this, surely this is something that should be dealt with in the library not the consuming app...)
I've tried setting my libraries module name to something super unique in the kotlinOptions:
kotlinOptions {
jvmTarget = '1.8'
moduleName = "com.mylibrary.superuniquename"
}
But it is still causing the issue.
Internet searches just show the same answer over and over - the consuming app should add packagingOptions to deal with this, but to me that just seems incorrect. Many Android libraries do not require this, so why should mine?