Fix building APK

This commit is contained in:
topjohnwu 2024-11-19 20:25:10 -08:00
parent 024da05888
commit 082330808f
4 changed files with 10 additions and 9 deletions

View File

@ -25,6 +25,13 @@ android {
compileOptions { compileOptions {
isCoreLibraryDesugaringEnabled = true isCoreLibraryDesugaringEnabled = true
} }
buildTypes {
release {
isMinifyEnabled = true
isShrinkResources = true
}
}
} }
dependencies { dependencies {

View File

@ -34,13 +34,9 @@
-keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation -keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation
# Excessive obfuscation # Excessive obfuscation
-repackageclasses 'a' -flattenpackagehierarchy
-allowaccessmodification -allowaccessmodification
-obfuscationdictionary ../dict.txt
-classobfuscationdictionary ../dict.txt
-packageobfuscationdictionary ../dict.txt
-dontwarn org.bouncycastle.jsse.BCSSLParameters -dontwarn org.bouncycastle.jsse.BCSSLParameters
-dontwarn org.bouncycastle.jsse.BCSSLSocket -dontwarn org.bouncycastle.jsse.BCSSLSocket
-dontwarn org.bouncycastle.jsse.provider.BouncyCastleJsseProvider -dontwarn org.bouncycastle.jsse.provider.BouncyCastleJsseProvider

View File

@ -28,6 +28,8 @@ android {
buildTypes { buildTypes {
release { release {
proguardFiles("proguard-rules.pro") proguardFiles("proguard-rules.pro")
isMinifyEnabled = true
isShrinkResources = false
} }
} }

View File

@ -315,10 +315,6 @@ fun Project.setupAppCommon() {
else signingConfigs["debug"] else signingConfigs["debug"]
} }
} }
release {
isMinifyEnabled = true
isShrinkResources = true
}
} }
lint { lint {