Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do I need to 'keep' Parcelable in proguard rules while obfuscating

My Project has few classes that extends Parcelable. Do I need to 'keep' them in proguard rules while obfuscating.

What is the general practice for parcelables?

like image 548
vijay_t Avatar asked Mar 18 '16 05:03

vijay_t


1 Answers

No, the default android rules include this:

-keepclassmembers class * implements android.os.Parcelable {
  public static final android.os.Parcelable$Creator CREATOR;
}

These default rules will be applied if you leave the default generated gradle definition in place:

proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
like image 65
Doug Stevenson Avatar answered Nov 06 '22 15:11

Doug Stevenson