fix: production build config
This commit is contained in:
+17
-1
@@ -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"))
|
||||
|
||||
Vendored
+3
@@ -19,3 +19,6 @@
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
|
||||
# Keep all protobuf generated message classes and their fields
|
||||
-keep class * extends com.google.protobuf.GeneratedMessageLite { *; }
|
||||
|
||||
Reference in New Issue
Block a user