adwiv / android-fat-aar

Gradle script that allows you to merge and embed dependencies in generted aar file
The Unlicense
1.46k stars 435 forks source link

Suggest not merge jars into classes.jar #24

Closed penglu20 closed 7 years ago

penglu20 commented 8 years ago

When use proguard, it would be better to leave the jars in the libs directory, rather than merge them into classes.jar in the aar. Because when we provide the aar, and the users use the same jar with another version , he can replace them as follow: compile(name: 'mylib', ext: 'aar') { exclude group: 'com.android.support', module: 'support-v4' } When users use proguard, they can use as follow: -libraryjars libs/log4j.jar

ps , please forgive my bad English.

adwiv commented 7 years ago

Fixed in current release. We simply copy the included jars in libs directory to the libs directory of the fat-aar file. Although its a better practice to use gradle dependencies instead of bundling jars.

Cheers.