Reputation: 1599
I am working on a Android Library. I need to use various open source libraries like volley, socket.io etc. Should I add dependency in build.gradle file or Should I include the source code as a package in my library module ?
Since Volley and Socket.io are pretty common libraries, I want to avoid any type of conflict in the future? It should work well under following coditions.
I need to export the library to jCenter;
There aren't much resources available, the one which are available, are complex.
Upvotes: 1
Views: 134
Reputation: 20130
If you want that your library uses specific version all the time then you should include dependencies by sources and rename packages to avoid dex issues for clients if they going to use same library.
I would still state dependencies in build.gradle
and allow client of the library to decide about dependency conflict resolution
Upvotes: 1