fix: production build config
This commit is contained in:
+17
-1
@@ -1,4 +1,9 @@
|
|||||||
import com.google.protobuf.gradle.*
|
import com.google.protobuf.gradle.*
|
||||||
|
import java.util.Properties
|
||||||
|
|
||||||
|
val localProps = Properties().apply {
|
||||||
|
load(rootProject.file("local.properties").inputStream())
|
||||||
|
}
|
||||||
|
|
||||||
configurations.all {
|
configurations.all {
|
||||||
resolutionStrategy {
|
resolutionStrategy {
|
||||||
@@ -36,13 +41,24 @@ android {
|
|||||||
|
|
||||||
testBuildType = "benchmark"
|
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 {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
isMinifyEnabled = false
|
// isMinifyEnabled = true // Enables R8/ProGuard shrinking
|
||||||
|
// isShrinkResources = true // Removes unused resources
|
||||||
proguardFiles(
|
proguardFiles(
|
||||||
getDefaultProguardFile("proguard-android-optimize.txt"),
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||||
"proguard-rules.pro"
|
"proguard-rules.pro"
|
||||||
)
|
)
|
||||||
|
signingConfig = signingConfigs.getByName("release")
|
||||||
}
|
}
|
||||||
create("benchmark") {
|
create("benchmark") {
|
||||||
initWith(buildTypes.getByName("release"))
|
initWith(buildTypes.getByName("release"))
|
||||||
|
|||||||
Vendored
+4
-1
@@ -18,4 +18,7 @@
|
|||||||
|
|
||||||
# If you keep the line number information, uncomment this to
|
# If you keep the line number information, uncomment this to
|
||||||
# hide the original source file name.
|
# 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 { *; }
|
||||||
|
|||||||
Reference in New Issue
Block a user