

SourceFile and LineNumberTable attributes for producing obfuscated stack traces with source file name and line number of method. For example, the Exceptions, InnerClasses, and Signature attributes are used when processing a library. It helps in preserving some attributes that may be required for reflection. keepattributes *Annotation*,Signature,InnerClasses,EnclosingMethod For example if an exception occurs, this option will print out the entire stack trace, instead of just the exception message. It helps in printing a proper explanation of the R8 Shrinking process. It simply tells not to ignore any non-public library classes. This tells not to use mixed case in class names. dontusemixedcaseclassnamesīy default, obfuscated class names can contain a mix of upper-case characters and lower-case characters. Let’s see what is inside proguard-android.txt -dontoptimizeĪs the name suggest, it specifies not to run any optimizations like code inlining, merge classes and class members. Lesser the code, lesser will be the compile time, faster will be the execution and lesser the memory.Īndroid Gradle Plugin provides us two different ProGuard rules config files which are located under build/intermediates/proguard-files. R8 uses ProGuard Rules as its configuration language. These days application size matters and for that Android has provided us with a tool called R8.
