taplytics / Taplytics-Android-SDK

Taplytics Android SDK
http://taplytics.com
19 stars 9 forks source link

Build Failure w/ Proguard enabled #15

Closed kanetik closed 8 years ago

kanetik commented 8 years ago

@VicV With the update to Taplytics 1.9.0, I get an error building with Proguard enabled. The error says something about "expected { but found ; on line 190 of proguard.txt" (it includes the path to the Taplytics proguard file which is copied below. Line 190 is this:

-keep public class com.taplytics.sdk.TLGcmBroadcastReceiver; - presumably the trailing ";" should simply be deleted.


Full proguard.txt file:

-dontshrink

-dontnote

-dontoptimize

-keepattributes Exceptions,LineNumberTable,Signature,Annotation,SourceFile

-keepparameternames

-renamesourcefileattribute SourceFile

-optimizations !code/simplification/arithmetic

-keepclassmembers class * extends java.io.Serializable { static final long serialVersionUID; private static final java.io.ObjectStreamField[] serialPersistentFields; private void writeObject(java.io.ObjectOutputStream); private void readObject(java.io.ObjectInputStream); java.lang.Object writeReplace(); java.lang.Object readResolve(); }

-dontwarn io.socket. -dontwarn com.taplytics. -dontwarn okio.* -dontwarn java.nio.file. -dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement

-keep public class com.taplytics.sdk.Taplytics { public protected ; public protected ; public protected *; }

-keep public interface com.taplytics.sdk.TaplyticsPushNotificationListener { public protected *;

; } -keep public interface com.taplytics.sdk.TaplyticsPushNotificationIntentListener { public protected *; ; } -keep public interface com.taplytics.sdk.TaplyticsDelayLoadListener { public protected *; ; } -keep public interface com.taplytics.sdk.TaplyticsResetUserListener { public protected *; ; } -keep public interface com.taplytics.sdk.TaplyticsPushTokenListener { public protected *; ; } -keep public interface com.taplytics.sdk.TaplyticsNewSessionListener { public protected *; ; } -keep public interface com.taplytics.sdk.TaplyticsRunningExperimentsListener { public protected *; ; } -keep public interface com.taplytics.sdk.TaplyticsVarListener { public protected *; ; } -keep public interface com.taplytics.sdk.CodeBlockListener { public protected *; ; } -keep public interface com.taplytics.sdk.TaplyticsExperimentsLoadedListener { public protected *; ; } -keep public class com.taplytics.sdk.TaplyticsVar {*;} -keepnames public class com.taplytics.sdk.TaplyticsVar -keep public interface com.taplytics.sdk.CodeBlockListener { public protected *; ; } -keep public interface com.taplytics.sdk.TaplyticsPushOpenedListener { public protected *; ; } -keep public interface com.taplytics.sdk.TaplyticsPushSubscriptionChangedListener { public protected *; ; } -keepnames public class com.taplytics.sdk.TLGcmIntentService -keepnames public class com.taplytics.sdk.TLGeofenceEventService -keep public class com.taplytics.sdk.TLBootReceiver -keep public class com.taplytics.sdk.TLGcmBroadcastReceiver; -keep public class com.taplytics.sdk.TLGcmBroadcastReceiver { public protected *; ; } # Also keep - Enumerations. Keep the special static methods that are required in # enumeration classes. -keepclassmembers enum \* { public static *_[] values(); public static *_ valueOf(java.lang.String); } -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; } # Keeping google play services class that we use reflection for -keep public class com.google.android.gms.gcm.GoogleCloudMessaging{ *; } -keep public class com.google.android.gms.location.GeofencingEvent{ *; } -keep public class com.google.android.gms.location.Geofence{ *; } -keep public class com.google.android.gms.common.api.GoogleApiClient$Builder{ *; } -keep public class com.google.android.gms.common.api.GoogleApiClient$OnConnectionFailedListener{ *; } -keep public class com.google.android.gms.common.api.GoogleApiClient$ConnectionCallbacks{ *; } -keep public class com.google.android.gms.location.LocationServices{ *; } -keep public class com.google.android.gms.common.api.GoogleApiClient{ *; } -keep public class com.google.android.gms.analytics.Tracker{ *; } -keepclassmembernames public class android.support.v7.widget.RecyclerView{ *; } -keepclassmembernames public class android.widget.AbsListView{ *; } -keep class android.support.v4.app.Fragment { *; } -keep class android.support.v4.view.ViewPager -keepclassmembers class android.support.v4.view.ViewPager$LayoutParams { *; } -keep class com.mixpanel.android.mpmetrics.MixpanelAPI { *;} -keep class com.flurry.android.FlurryAgent { *; } # Keeping recyclerView and listView stuff so that doesn't get obfuscated away
kanetik commented 8 years ago

The exact text of the error message is: "Expecting opening '{' at ';' in line 104 of file 'C:\Users\Jeremy\My Projects\Wakey\app\build\intermediates\exploded-aar\com.taplytics.sdk\taplytics\1.9.0\proguard.txt'"

VicV commented 8 years ago

@jkane001 do a ./gradlew clean build --refresh-dependencies

I'm pretty sure I shortly right after I released it, so I didn't do a vernum bump.

Let me know.

kanetik commented 8 years ago

Did that, still get the same result. Perhaps a version bump is needed after all?

On Sun, Jun 12, 2016 at 7:30 PM Victor Vucicevich (Vic Vu) < notifications@github.com> wrote:

@jkane001 https://github.com/jkane001 do a ./gradlew clean build --refresh-dependencies

I'm pretty sure I shortly right after I released it, so I didn't do a vernum bump.

Let me know.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/taplytics/Taplytics-Android-SDK/issues/15#issuecomment-225466918, or mute the thread https://github.com/notifications/unsubscribe/AAwn0SavtpYqwbHWS2jAheXSmuoFUnTOks5qLJasgaJpZM4IzpEA .

VicV commented 8 years ago

I guess so. I'm trying to find out how it passed my CI right now.

VicV commented 8 years ago

@jkane001 try that again. I had uploaded the wrong file.

VicV commented 8 years ago

https://github.com/taplytics/Taplytics-Android-SDK/releases/tag/1.9.1

kanetik commented 8 years ago

That seems to have fixed it - thanks!