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

apache common-io dependency conflict with proguard #5

Closed
ghost opened this issue Oct 29, 2014 · 4 comments
Closed

apache common-io dependency conflict with proguard #5

ghost opened this issue Oct 29, 2014 · 4 comments

Comments

@ghost
Copy link

ghost commented Oct 29, 2014

Hi, I'm using your library to have more control on exif tags than android default one, it seems to work very good !

However I faced a problem with commons-io dependency. I use other libraries in my project and one of them uses a more recent version of commons-io, and that prevents builds from using proguard (that complains about duplicate zip entry). Would it be possible that you change your import to use version 2.0.1 of commons-io which seems to be the current one ?
http://mvnrepository.com/artifact/commons-io/commons-io/2.0.1

That would prevent from including your sources directly in the project when facing similar cases and use the more "clean" option of gradle depency declaration :)

Thanks a lot

@sephiroth74
Copy link
Owner

you can exclude the included commons-io library by adding this to your gradle build:
compile('it.sephiroth.android.exif:android-exif-extended:1.0.5@aar') {
transitive = true
exclude group: 'org.apache.commons'
}

and adding this to the android container:
packagingOptions {
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}

@ghost
Copy link
Author

ghost commented Oct 29, 2014

I tried as you said but it doesn't seems to work, proguard complains about not finding IOUtils class and if I add a -dontwarn directive I can build but it crashes when trying to access the class. The other library making the conflict is couchbase-lite-android. Thanks anyway for your answer, I will stick to including sources in the project for the moment.

@sephiroth74
Copy link
Owner

I have no problems with the above solution (the same I'm using in another project).
I have to say I'm using 'commons-io:commons-io:2.4' in that project

@ghost
Copy link
Author

ghost commented Oct 29, 2014

Ok after some more tries, I found I forgot to add the commons-io dependency in the project after excluding it from your library reference, thinking it would be taken from the couchbase library dependencies. I'm not very at ease with gradle yet, but it seems to work now. Thanks

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

No branches or pull requests

1 participant