Demystifying Proguard: A simplified guide to understanding and integrating Proguard in your Android app

Faheem un nisa
BYJU’S Exam Prep Engineering
6 min readJul 21, 2020

--

If you have worked on end to end development of an Android app, you are bound to have crossed paths with the magical tool called Proguard! If you haven’t or are having trouble wrapping your head around it, worry not; this article is here to help! By the end of it, you should have a fairly decent idea of what Proguard is and how to seamlessly integrate it with your Android app to reap its benefits.

So let’s delve straight into it and demystify the air that surrounds it!

What is Proguard?

ProGuard is a free Java tool in Android that performs three major roles:

1. Shrink/minify the code (remove unused code in the project)

  • Code shrinking (or tree-shaking): detects and safely removes unused classes, fields, methods, and attributes from your app and its library dependencies e.g. if you use only a few APIs of a library dependency, shrinking can identify library code that your app is not using and remove only that code from your app.
  • Resource shrinking: removes unused resources from your packaged app, including unused resources in your app’s library dependencies. It works in conjunction with code…

--

--