manneohlund / smart-recycler-adapter

Small, smart and generic adapter for recycler view with easy and advanced data to ViewHolder binding.
https://manneohlund.github.io/smart-recycler-adapter/
Apache License 2.0
402 stars 51 forks source link

Duplicate class when library used as a transative dependency #39

Open bensmiley opened 3 years ago

bensmiley commented 3 years ago

I have a popular open-source library and I'm using SmartRecyclerAdapter for some of the table views. However, when I include the dependency in my project and push it to Bintray, if I include the library I get these errors:

Duplicate class io.github.manneohlund.smartrecycleradapter.viewevent.BuildConfig found in modules 

jetified-smart-recycler-adapter-viewevent-1.0.0-beta03-runtime (io.github.manneohlund.smart-recycler-adapter:smart-recycler-adapter-viewevent:5.0.0-rc01) and jetified-smart-recycler-adapter-viewevent-1.0.0-beta03-runtime (io.github.manneohlund:smart-recycler-adapter-viewevent:1.0.0-beta03)

Duplicate class smartadapter.viewevent.dragdrop.AutoDragAndDropBinder found in modules 

jetified-smart-recycler-adapter-viewevent-1.0.0-beta03-runtime (io.github.manneohlund.smart-recycler-adapter:smart-recycler-adapter-viewevent:5.0.0-rc01) and jetified-smart-recycler-adapter-viewevent-1.0.0-beta03-runtime (io.github.manneohlund:smart-recycler-adapter-viewevent:1.0.0-beta03)

chat-sdk-android-v5-gradle.zip

Here is a project that demonstrates the issue. To summarise. When Library A includes the dependency:

api 'io.github.manneohlund:smart-recycler-adapter:5.0.0-rc01'
api 'io.github.manneohlund:smart-recycler-adapter-viewevent:1.0.0-beta03'

If library A is published to Bintray and Library B includes a dependency to library A, these errors appear. Your project is great and it would be a shame if it couldn't be included in third-party projects.