mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-14 08:17:04 +05:30
android: enable R8
This commit is contained in:
parent
1c2ae9ad99
commit
c927a47759
4 changed files with 63 additions and 1 deletions
|
@ -53,7 +53,12 @@ android {
|
|||
}
|
||||
buildTypes.all { signingConfig = signingConfigs.getByName("release") }
|
||||
}
|
||||
buildTypes { getByName("release") { isMinifyEnabled = false } }
|
||||
buildTypes {
|
||||
getByName("release") {
|
||||
isMinifyEnabled = true
|
||||
proguardFiles("proguard-android-optimize.txt", "proguard-rules.pro")
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
|
|
36
android/proguard-android-optimize.txt
Normal file
36
android/proguard-android-optimize.txt
Normal file
|
@ -0,0 +1,36 @@
|
|||
-allowaccessmodification
|
||||
-dontpreverify
|
||||
-dontusemixedcaseclassnames
|
||||
-dontskipnonpubliclibraryclasses
|
||||
-verbose
|
||||
|
||||
-keepattributes *Annotation*
|
||||
|
||||
-keepclasseswithmembernames class * {
|
||||
native <methods>;
|
||||
}
|
||||
|
||||
-keepclassmembers enum * {
|
||||
public static **[] values();
|
||||
public static ** valueOf(java.lang.String);
|
||||
}
|
||||
|
||||
-keepclassmembers class * implements android.os.Parcelable {
|
||||
public static final ** CREATOR;
|
||||
}
|
||||
|
||||
-keep class androidx.annotation.Keep
|
||||
|
||||
-keep @androidx.annotation.Keep class * {*;}
|
||||
|
||||
-keepclasseswithmembers class * {
|
||||
@androidx.annotation.Keep <methods>;
|
||||
}
|
||||
|
||||
-keepclasseswithmembers class * {
|
||||
@androidx.annotation.Keep <fields>;
|
||||
}
|
||||
|
||||
-keepclasseswithmembers class * {
|
||||
@androidx.annotation.Keep <init>(...);
|
||||
}
|
16
android/proguard-rules.pro
vendored
Normal file
16
android/proguard-rules.pro
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
-keepattributes SourceFile,LineNumberTable
|
||||
-keepattributes RuntimeVisibleAnnotations,
|
||||
RuntimeVisibleParameterAnnotations,
|
||||
RuntimeVisibleTypeAnnotations,
|
||||
AnnotationDefault
|
||||
-renamesourcefileattribute SourceFile
|
||||
# Retain the generic signature of retrofit2.Call until added to Retrofit.
|
||||
# Issue: https://github.com/square/retrofit/issues/3580.
|
||||
# Pull request: https://github.com/square/retrofit/pull/3579.
|
||||
-keep,allowobfuscation,allowshrinking class retrofit2.Call
|
||||
|
||||
# Retain annotation default values for all annotations.
|
||||
# Required until R8 version >= 3.1.12-dev (expected in AGP 7.1.0-alpha4).
|
||||
-keep,allowobfuscation,allowshrinking @interface *
|
||||
|
||||
-keep,allowobfuscation,allowshrinking class dev.msfjarvis.claw.android.** { *; }
|
Loading…
Add table
Add a link
Reference in a new issue