My ProGuard Configuration Base File

Posted by in Software

Following my previous proguard entry, I think it’s useful to present my final proguard configuration. I’m starting with my base file (, explaining it along the way (as much as I can understand).

Proguard Set-up

I have a normal project structure ( <fallpaper>/<app>), and my proguard is configured in <fallpaper>/<app>/build.gradle. The confgiration sequence in my gradle file is:

Proguard Configuration

I’m starting by enabling some global flags in my file:

I’m not using the obfuscation yet because it’s silly hard to get it right with some 3rd party libraries. However, I’m using optimisations and I want it verbose.

Next, I’m saving some interesting data (most notably the unused stuff):

Currently, gradle creates build directories at both levels, so I’m saving the files in the root build/ directory.

Lastly, I have a list of included files, one for each library used (as noted in my previous post):

Note that ../dagger-proguard-keepnames.cfg is generted by dagger proguard helper plugin.

The base file is ready now.


A little experiment: If you find this post and ad below useful, please check the ad out 🙂