Skip to content

Commit

Permalink
Update R8 configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
red-coracle committed Oct 25, 2021
1 parent 4895233 commit 4fb762b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 33 deletions.
5 changes: 3 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ android {
versionNameSuffix '-DEBUG'
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
lintOptions {
Expand Down
38 changes: 7 additions & 31 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -9,40 +9,16 @@

# Add any project specific keep options here:

# Retrofit
-keepattributes Exceptions
-keepattributes Signature, InnerClasses, EnclosingMethod
-keepattributes RuntimeVisibleAnnotations, RuntimeVisibleParameterAnnotations
-keepclassmembers,allowshrinking,allowobfuscation interface * {
@retrofit2.http.* <methods>;
}
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
-dontwarn javax.annotation.**
-dontwarn kotlin.Unit
-dontwarn retrofit2.KotlinExtensions
-dontwarn retrofit2.KotlinExtensions$*
-if interface * { @retrofit2.http.* <methods>; }
-keep,allowobfuscation interface <1>

# OkHttp
-dontwarn javax.annotation.**
-keepnames class okhttp3.internal.publicsuffix.PublicSuffixDatabase
-dontwarn org.codehaus.mojo.animal_sniffer.*
-dontwarn okhttp3.internal.platform.ConscryptPlatform

# Okio
-dontwarn org.codehaus.mojo.animal_sniffer.*

# Glide
-keep public class * implements com.bumptech.glide.module.GlideModule
-keep public class * extends com.bumptech.glide.module.AppGlideModule
-keep class com.bumptech.glide.GeneratedAppGlideModuleImpl
-keep public enum com.bumptech.glide.load.ImageHeaderParser$** {
**[] $VALUES;
public *;
}

# TVDB
-keep class com.uwetrottmann.thetvdb.entities.** { *; }

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# R8 said to add these
-dontwarn kotlin.coroutines.Continuation

0 comments on commit 4fb762b

Please sign in to comment.