fix: production build config

This commit is contained in:
2026-06-08 23:05:04 +02:00
parent f4b74ee43d
commit 36d04f5c87
2 changed files with 21 additions and 2 deletions
+17 -1
View File
@@ -1,4 +1,9 @@
import com.google.protobuf.gradle.*
import java.util.Properties
val localProps = Properties().apply {
load(rootProject.file("local.properties").inputStream())
}
configurations.all {
resolutionStrategy {
@@ -36,13 +41,24 @@ android {
testBuildType = "benchmark"
signingConfigs {
create("release") {
storeFile = file(localProps["KEYSTORE_PATH"] as String)
storePassword = localProps["KEYSTORE_PASSWORD"] as String
keyAlias = localProps["KEY_ALIAS"] as String
keyPassword = localProps["KEY_PASSWORD"] as String
}
}
buildTypes {
release {
isMinifyEnabled = false
// isMinifyEnabled = true // Enables R8/ProGuard shrinking
// isShrinkResources = true // Removes unused resources
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
signingConfig = signingConfigs.getByName("release")
}
create("benchmark") {
initWith(buildTypes.getByName("release"))
+4 -1
View File
@@ -18,4 +18,7 @@
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
#-renamesourcefileattribute SourceFile
# Keep all protobuf generated message classes and their fields
-keep class * extends com.google.protobuf.GeneratedMessageLite { *; }