Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does -keep class do in ProGuard

I know that keep class is suppose to keep the class.

  1. But let's say if I keep class on a specific class, will it not obfuscate the said class?

    -keep class com.myproject.activities.**

  2. What is the difference between keep class vs keep public class

like image 678
JayVDiyk Avatar asked Apr 11 '16 15:04

JayVDiyk


1 Answers

I know this is too late to answer but this may helpfull for someone. From Guard Square documentation about -keep

-keep Specifies classes and class members (fields and methods) to be preserved as entry points to your code. For example, in order to keep an application, you can specify the main class along with its main method. In order to process a library, you should specify all publicly accessible elements.

You can check below links for more details about ProGuard specifires. https://www.guardsquare.com/en/proguard/manual/usage

http://omgitsmgp.com/2013/09/09/a-conservative-guide-to-proguard-for-android/

like image 185
Rahul Sharma Avatar answered Oct 04 '22 10:10

Rahul Sharma