futurice / android-best-practices

Do's and Don'ts for Android development, by Futurice developers
Other
20.35k stars 3.38k forks source link

Always use Proguard (in debug too!) #182

Open dral3x opened 6 years ago

dral3x commented 6 years ago

From my experience, is not good having too different configurations between debug and release, and this is especially true when Proguard is enabled only in one.

We found safer have minifyEnabled true also for the debug build, and turn off just the obfuscation (with a specific proguard-rules-debug.pro file).

You don't want to have your app running fine on your device while crashing on the user phone because you miss something in ProGuard configuration.

rpattabi commented 6 years ago

Makes sense. Only contention is the increased build time depending on the size of the project and dependencies.

dral3x commented 6 years ago

@rpattabi that's true, I agree. But since we're not in the javascript world, I prefer the "better safe than sorry" route