From 5fe44955cf583b7944c3a6e13c7021aa150f11e5 Mon Sep 17 00:00:00 2001 From: Rich Slogar Date: Tue, 10 Mar 2015 15:17:32 -0700 Subject: docs: remove studio proguard settings from play services b/19641719 Change-Id: Id3d9e2db10fc5264b11f41a8359dc05511af7634 --- docs/html/google/play-services/setup.jd | 50 +++++++++++++++++++++++++++------ 1 file changed, 42 insertions(+), 8 deletions(-) (limited to 'docs/html/google/play-services/setup.jd') diff --git a/docs/html/google/play-services/setup.jd b/docs/html/google/play-services/setup.jd index 148f5a6..ad19cb3 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
@@ -192,6 +192,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.

+ +
@@ -226,6 +237,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;
+}
+
+ + +
@@ -256,8 +294,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

@@ -283,11 +319,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

-- cgit v1.1