sephiroth74 / Android-Exif-Extended

Exif extended library for Android, based on jhead c library (http://www.sentex.net/~mwandel/jhead/)
Other
135 stars 45 forks source link

apache common-io dependency conflict with proguard #5

Closed ghost closed 10 years ago

ghost commented 10 years ago

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 commented 10 years ago

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 commented 10 years ago

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 commented 10 years ago

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 commented 10 years ago

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