krschultz / android-proguard-snippets

Proguard configurations for common Android libraries

Home Page:http://www.kevinrschultz.com/blog/2014/02/15/proguard-with-gradle/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

What If we have an aar regarding to this?

PrashamTrivedi opened this issue · comments

Libraries built with gradle can have consumerProguardFiles, which will be added in application itself. Google Play Services does that (as per Ian Lake's google+ post, when Google play services 7.5 are added). I have added consumer proguard line in one of my libraries here

How about having an aar built around these files? people don't have to download all the files separately and adding manually? Just add a library as dependency and it should take care of keep classes in proguard. In my knowledge it won't add anything to final apk, as we're not adding any code into the library, just build logic. I am proposing aar because I am familiar with developing gradle plugins and on the other hand I am not aware about adding consumerProguardFiles programatically from plugins.

Only downside I can see is the library size itself is too big provided there are too many files. But as I have stated above it should not add any footprint to final apk size. So, are we going to have aar library around that?

I have created a library project which follows this principle.
https://github.com/PrashamTrivedi/ProguardSnips

If you think it can be merged with this or any other way my library can help this, I am welcome for that.

Thanks for this library.