diff --git a/docs/setup.md b/docs/setup.md index e0da06569..664a20cd8 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -75,6 +75,25 @@ If you are using Gradle, add this to your dependencies: compile 'com.google.http-client:google-http-client:[VERSION]' ``` +## ProGuard + +The library uses reflection to access generic types and fields annotated with `@Key`. Add the +following rules to your ProGuard configuration: + +``` +-keepattributes Signature,RuntimeVisibleAnnotations,AnnotationDefault + +-keepclassmembers class * { + @com.google.api.client.util.Key ; +} +``` + +When using `google-http-client-android`, also add: + +``` +-dontwarn com.google.api.client.extensions.android.** +``` + ## Download the library with dependencies Download the latest assembly zip file from Maven Central and extract it on your computer. This zip @@ -85,4 +104,3 @@ the dependencies folder. For more details about the contents of the download, se -