| # Copyright 2014 Google Inc. All rights reserved. |
| # |
| # Licensed under the Apache License, Version 2.0 (the "License"); |
| # you may not use this file except in compliance with the License. |
| # You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| |
| |
| # This is a configuration file for ProGuard. |
| # http://proguard.sourceforge.net/index.html#manual/usage.html |
| -dontusemixedcaseclassnames |
| -dontskipnonpubliclibraryclasses |
| -verbose |
| # Optimization is turned off by default. Dex does not like code run |
| # through the ProGuard optimize and preverify steps (and performs some |
| # of these optimizations on its own). |
| -dontoptimize |
| -dontpreverify |
| |
| # If you want to enable optimization, you should include the |
| # following: |
| # -optimizations !code/simplification/arithmetic,!code/simplification/cast,!field/*,!class/merging/* |
| # -optimizationpasses 5 |
| # -allowaccessmodification |
| # |
| # Note that you cannot just include these flags in your own |
| # configuration file; if you are including this file, optimization |
| # will be turned off. You'll need to either edit this file, or |
| # duplicate the contents of this file and remove the include of this |
| # file from your project's proguard.config path property. |
| -keepattributes *Annotation* |
| -keep public class * extends android.app.Activity |
| -keep public class * extends android.app.Application |
| -keep public class * extends android.app.Service |
| -keep public class * extends android.content.BroadcastReceiver |
| -keep public class * extends android.content.ContentProvider |
| -keep public class * extends android.app.backup.BackupAgent |
| -keep public class * extends android.preference.Preference |
| -keep public class * extends android.support.v4.app.Fragment |
| -keep public class * extends android.app.Fragment |
| # For native methods, see http://proguard.sourceforge.net/manual/examples.html#native |
| -keepclasseswithmembernames class * { |
| native <methods>; |
| } |
| -keep public class * extends android.view.View { |
| public <init>(android.content.Context); |
| public <init>(android.content.Context, android.util.AttributeSet); |
| public <init>(android.content.Context, android.util.AttributeSet, int); |
| public void set*(...); |
| } |
| -keepclasseswithmembers class * { |
| public <init>(android.content.Context, android.util.AttributeSet); |
| } |
| -keepclasseswithmembers class * { |
| public <init>(android.content.Context, android.util.AttributeSet, int); |
| } |
| -keepclassmembers class * extends android.app.Activity { |
| public void *(android.view.View); |
| } |
| # For enumeration classes, see http://proguard.sourceforge.net/manual/examples.html#enumerations |
| -keepclassmembers enum * { |
| public static **[] values(); |
| public static ** valueOf(java.lang.String); |
| } |
| -keep class * implements android.os.Parcelable { |
| public static final android.os.Parcelable$Creator *; |
| } |
| -keepclassmembers class **.R$* { |
| public static <fields>; |
| } |
| # The support library contains references to newer platform versions. |
| # Don't warn about those in case this app is linking against an older |
| # platform version. We know about them, and they are safe. |
| -dontwarn android.support.** |
| # Needed by google-http-client to keep generic types and @Key annotations accessed via reflection |
| -keepclassmembers class * { |
| @com.google.api.client.util.Key <fields>; |
| } |
| # Needed just to be safe in terms of keeping Google API service model classes |
| -keep class com.google.api.services.*.model.* |
| -keep class com.google.api.client.** |
| -keepattributes Signature,RuntimeVisibleAnnotations,AnnotationDefault |
| # See https://groups.google.com/forum/#!topic/guava-discuss/YCZzeCiIVoI |
| -dontwarn com.google.common.collect.MinMaxPriorityQueue |
| -dontobfuscate |
| # Assume dependency libraries Just Work(TM) |
| -dontwarn com.google.android.youtube.** |
| -dontwarn com.google.android.analytics.** |
| -dontwarn com.google.common.** |
| # Don't discard Guava classes that raise warnings |
| -keep class com.google.common.collect.MapMakerInternalMap$ReferenceEntry |
| -keep class com.google.common.cache.LocalCache$ReferenceEntry |
| # Make sure that Google Analytics doesn't get removed |
| -keep class com.google.analytics.tracking.android.CampaignTrackingReceiver |
| ## BEGIN -- Google Play Services proguard.txt |
| -keep class * extends java.util.ListResourceBundle { |
| protected java.lang.Object[][] getContents(); |
| } |
| # Keep SafeParcelable value, needed for reflection. This is required to support backwards |
| # compatibility of some classes. |
| -keep public class com.google.android.gms.common.internal.safeparcel.SafeParcelable { |
| public static final *** NULL; |
| } |
| # Keep the names of classes/members we need for client functionality. |
| -keepnames @com.google.android.gms.common.annotation.KeepName class * |
| -keepclassmembernames class * { |
| @com.google.android.gms.common.annotation.KeepName *; |
| } |
| # Needed for Parcelable/SafeParcelable Creators to not get stripped |
| -keepnames class * implements android.os.Parcelable { |
| public static final ** CREATOR; |
| } |
| ## END -- Google Play Services proguard.txt |
| # Other settings |
| -keep class com.android.** |
| -keep class com.google.android.** |
| -keep class com.google.android.gms.** |
| -keep class com.google.android.gms.location.** |
| -keep class com.google.api.client.** |
| -keep class com.google.maps.android.** |
| -keep class libcore.** |
| -dontwarn org.junit.** |
| -dontwarn org.mockito.** |
| -dontwarn org.robolectric.** |
| -dontwarn com.bumptech.glide.GlideTest |