Fix crashes in release due to ProGuard

This commit is contained in:
Maxr1998 2020-05-19 12:31:30 +02:00 committed by dkanada
commit f054724453
2 changed files with 32 additions and 0 deletions

View file

@ -20,6 +20,7 @@ android {
release { release {
minifyEnabled true minifyEnabled true
shrinkResources true shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
} }
debug { debug {

31
app/proguard-rules.pro vendored Normal file
View file

@ -0,0 +1,31 @@
-dontwarn
-ignorewarnings
# RetroFit
-dontwarn retrofit.**
-keep class retrofit.** { *; }
-keepattributes Signature
-keepattributes Exceptions
# Glide
-keep public class * implements com.bumptech.glide.module.GlideModule
-keep public enum com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$** {
**[] $VALUES;
public *;
}
# ButterKnife
-keep class butterknife.** { *; }
-dontwarn butterknife.internal.**
-keep class **$$ViewBinder { *; }
-keepclasseswithmembernames class * {
@butterknife.* <fields>;
}
-keepclasseswithmembernames class * {
@butterknife.* <methods>;
}
-keep class !android.support.v7.internal.view.menu.**,** {*;}
# Jellyfin API models
-keepclasseswithmembers class org.jellyfin.apiclient.model.**.* { *; }