Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to use proguard in android 2.3

one of the features in android 2.3 is integrated proguard obfuscation when doing release builds. but how do i enable this obfuscation when creating my apk?

thanks!

like image 361
clamp Avatar asked Dec 14 '10 10:12

clamp


People also ask

Is R8 better than ProGuard?

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. 0 or above then the project uses R8 by default with Proguard rules only.


2 Answers

add the following into default.properties

proguard.config=proguard.cfg 

For details visit here

like image 110
Bright Guy Avatar answered Sep 20 '22 05:09

Bright Guy


I just used it with maven. If you are using maven as well, I would recommend you reading this blog post.

like image 45
Macarse Avatar answered Sep 22 '22 05:09

Macarse