Google Play Services ProGuard rules

Google Play Services - proprietary background service and API package for Android devices to simplify Android development, grow user base and monetize effectively.

ProGuard rules for Google Play Services

Add the following lines to your ProGuard configuration proguard.cfg file in project.

-keep public class com.google.android.gms.common.internal.safeparcel.SafeParcelable {
    public static final *** NULL;
}

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

-keep @interface android.support.annotation.Keep
-keep @android.support.annotation.Keep class *
-keepclasseswithmembers class * {
  @android.support.annotation.Keep ;
}
-keepclasseswithmembers class * {
  @android.support.annotation.Keep ;
}

-keep @interface com.google.android.gms.common.annotation.KeepName
-keepnames @com.google.android.gms.common.annotation.KeepName class *
-keepclassmembernames class * {
  @com.google.android.gms.common.annotation.KeepName *;
}

-keep @interface com.google.android.gms.common.util.DynamiteApi
-keep public @com.google.android.gms.common.util.DynamiteApi class * {
  public ;
  public ;
}

-dontwarn android.security.NetworkSecurityPolicy

For more information about Google Play Services please see the website.

Static Gson ProGuard rules

Popular ProGuard rules