From c024c8d87b19e23cedc6f5294dcc084804634c1a Mon Sep 17 00:00:00 2001 From: Jimmy Shih Date: Thu, 22 Sep 2011 18:47:31 -0700 Subject: [PATCH] Fix proguard issue with fusion table. Fusion table depends on google-api-client-1.2.2.alpha.jar. Proguard needs to be set correctly for the google-api-client library. Tested a release version and is able to send a track to fusion table. --- MyTracks/default.properties | 6 ++---- MyTracks/proguard.cfg | 12 ++++++++++++ 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/MyTracks/default.properties b/MyTracks/default.properties index ee3f68e34..75e62f9cb 100644 --- a/MyTracks/default.properties +++ b/MyTracks/default.properties @@ -13,7 +13,5 @@ split.density=false target=Google Inc.:Google APIs:13 android.library.reference.1=../MyTracksLib/ -# ProGuard is turned off while we investigate the removal of code that -# isn't actually dead from Fusion Tables. See issue 303 for an example of -# the result of that removal. -#proguard.config=proguard.cfg +# Enable proguard. +proguard.config=proguard.cfg diff --git a/MyTracks/proguard.cfg b/MyTracks/proguard.cfg index 8a6087a72..8b178c6b8 100644 --- a/MyTracks/proguard.cfg +++ b/MyTracks/proguard.cfg @@ -51,3 +51,15 @@ -keep class * implements android.os.Parcelable { public static final android.os.Parcelable$Creator *; } + +# Needed by google-api-client to keep generic types and @Key annotations accessed via reflection + +-keepclassmembers class * { + @com.google.api.client.util.Key ; +} + +-keepattributes Signature,RuntimeVisibleAnnotations,AnnotationDefault + +# Needed by Guava + +-dontwarn sun.misc.Unsafe