Add release build config and Play Store prep
- Add signing config (reads from env vars) - Enable R8 minification and resource shrinking - Expand ProGuard rules for Gson - Update README with build instructions and Play Store checklist
This commit is contained in:
@@ -15,13 +15,27 @@ android {
|
||||
versionName = "1.0.0"
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
create("release") {
|
||||
val keystoreFile = file("../keystore.jks")
|
||||
if (keystoreFile.exists()) {
|
||||
storeFile = keystoreFile
|
||||
storePassword = System.getenv("KEYSTORE_PASSWORD") ?: ""
|
||||
keyAlias = System.getenv("KEY_ALIAS") ?: "release"
|
||||
keyPassword = System.getenv("KEY_PASSWORD") ?: ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
isMinifyEnabled = false
|
||||
isMinifyEnabled = true
|
||||
isShrinkResources = true
|
||||
proguardFiles(
|
||||
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||
"proguard-rules.pro"
|
||||
)
|
||||
signingConfig = signingConfigs.findByName("release")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
7
app/proguard-rules.pro
vendored
7
app/proguard-rules.pro
vendored
@@ -6,3 +6,10 @@
|
||||
-keepattributes Signature
|
||||
-keepattributes *Annotation*
|
||||
-keep class dev.itsh.tetherapi.data.** { *; }
|
||||
-keep class com.google.gson.** { *; }
|
||||
|
||||
# Keep generic type info for Gson
|
||||
-keepattributes EnclosingMethod
|
||||
-keep class * implements com.google.gson.TypeAdapterFactory
|
||||
-keep class * implements com.google.gson.JsonSerializer
|
||||
-keep class * implements com.google.gson.JsonDeserializer
|
||||
|
||||
Reference in New Issue
Block a user