Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Proguard slowing down android build process too much

My Android app build process takes 3+ minutes with ProGuard enabled. What are some basic things I can do to speed this up?

like image 870
Nablon Avatar asked Mar 19 '15 17:03

Nablon


People also ask

Should I use R8 or ProGuard?

R8 is having a faster processing time than Proguard which reduces build time. R8 gives better output results than Proguard. R8 reduces the app size by 10 % whereas Proguard reduces app size by 8.5 %. The android app having a Gradle plugin above 3.4.

Should I enable ProGuard?

It is quite easy to reverse engineer Android applications, so if you want to prevent this from happening, yes, you should use ProGuard for its main function: obfuscation. ProGuard has also two other important functions: shrinking which eliminates unused code and is obviously highly useful and also optimization.

What does minifyEnabled do?

In the release block on the example, minifyEnabled refers to the automatic removal of unused resources in the packaged app. If true, Gradle also removes resources from dependent libraries if they are not needed. This only works if the shrinkResources property is also set to true.

What is ProGuard Android optimize?

The ProGuard tool shrinks, optimizes, and obfuscates your code by removing unused code and renaming classes, fields, and methods with semantically obscure names. The result is a smaller sized . apk file that is more difficult to reverse engineer.


1 Answers

Use proguard when you want to release your App. Do the test builds without Proguard.

like image 184
Arash Avatar answered Sep 28 '22 08:09

Arash