How to Shrink an application using ProGuard

Hi All,

I am looking to learn ProGuard and I was completely new to the platform. I have tried to add the rules using ProGuard PlayGround. But somehow those rules are not helping me to shrink the application. I was able to get the rules only with -keep and so on.

I am using a open source project for learning and its gradle based.

Please do help me in shrinking and obfuscating important class files and other things. Any Videos related to this will be very very helpful.

View my keep rules on: https://playground.proguard.com/p/GhDe2m

Regards,
Raviteja A

Hi @Raviteja_A,

Welcome to the ProGuard Community!

ProGuard Manual: Home | Guardsquare is a good entry point to learn how ProGuard works and how to configure it.

If you have tried specific things that don’t work, please add that code to your posts (the playground link doesn’t show anything).

1 Like

Hi Carsten,

I have gone through the suggested documentation. But when I am trying to implement the Proguard by writing the rules and saving it in proguard.pro file. Later I am trying to generate the apk file and getting an error. Is there any step by step documentation on implementation of Proguard which I can refer to. I am planning to automate the procedure via jenkins. Initial configuration will be done from my side and later on for every new release via Jenkins I want to generate the obfuscated and shrinked apk file.

Regards,
Raviteja A