Pro-guard in Android


  • Pro-guard can only be enabled in release builds, which is a good thing. Otherwise you would have to debug through obfuscated code.
  • Pro-guard can shrink, optimize and obfuscate code.
  • Obfuscated stack traces could be decoded using tool "retrace".
  • Enabling pro-guard in gradle based builds: set "minifyEnabled" to true.
  • Default pro-guard settings are available in <sdk>/tools/proguard/
    proguard-android.txt
  • Optimization can be enabled by using <sdk>/tools/proguard/proguard-android-optimize.txt file. But testing have to be thorough because these optimization rules may not be applicable to all versions of dalvik.
  •  Custom pro-guard rules can be added in proguard-rules.pro
  • While building with gradle build system, particular pro-guard rules can be applied to a targeted flavor

No comments:

Post a Comment

Scheduling Repeating Local Notifications using Alarm Manager

Learn about Scheduling Repeating Local Notifications using Alarm Manager in this post .