diff --git a/docs/html/google/play-services/setup.jd b/docs/html/google/play-services/setup.jd index e75235e78aecf..70e71078714e7 100644 --- a/docs/html/google/play-services/setup.jd +++ b/docs/html/google/play-services/setup.jd @@ -9,7 +9,7 @@ page.title=Setting Up Google Play Services

In this document

  1. Add Google Play Services to Your Project
  2. -
  3. Create a Proguard Exception
  4. +
  5. Create a ProGuard Exception
  6. Ensure Devices Have the Google Play services APK
@@ -195,6 +195,17 @@ you include an API that does have a separate library.)

+

Note: ProGuard directives are included in the Play services +client libraries to preserve the required classes. The +Android Plugin for Gradle +automatically appends ProGuard configuration files in an AAR (Android ARchive) package and appends +that package to your ProGuard configuration. During project creation, Android Studio automatically +creates the ProGuard configuration files and build.gradle properties for ProGuard use. +To use ProGuard with Android Studio, you must enable the ProGuard setting in your +build.gradle buildTypes. For more information, see the +ProGuard topic.

+ +
@@ -230,6 +241,33 @@ element: you can begin developing features with the Google Play services APIs.

+ +

Create a ProGuard Exception

+ +

To prevent ProGuard from stripping away +required classes, add the following lines in the +<project_directory>/proguard-project.txt file: +

+-keep class * extends java.util.ListResourceBundle {
+    protected Object[][] getContents();
+}
+
+-keep public class com.google.android.gms.common.internal.safeparcel.SafeParcelable {
+    public static final *** NULL;
+}
+
+-keepnames @com.google.android.gms.common.annotation.KeepName class *
+-keepclassmembernames class * {
+    @com.google.android.gms.common.annotation.KeepName *;
+}
+
+-keepnames class * implements android.os.Parcelable {
+    public static final ** CREATOR;
+}
+
+ + +
@@ -263,8 +301,6 @@ workspace—you should not reference the library directly from the Android S you can begin developing features with the Google Play services APIs.

-
-

Create a Proguard Exception

@@ -290,11 +326,9 @@ required classes, add the following lines in the } -

Note: When using Android Studio, you must add Proguard -to your build.gradle file's build types. For more information, see the -Gradle Plugin User Guide. - + + +

Ensure Devices Have the Google Play services APK