Add release signing config for Google Play upload
Read signing credentials from keystore.properties (gitignored) and configure the release build type to use the upload keystore.
This commit is contained in:
parent
43395b509c
commit
4eac128b6a
2
.gitignore
vendored
2
.gitignore
vendored
@ -10,3 +10,5 @@
|
||||
.externalNativeBuild
|
||||
.cxx
|
||||
local.properties
|
||||
keystore.properties
|
||||
*.jks
|
||||
|
||||
@ -7,10 +7,27 @@ plugins {
|
||||
alias(libs.plugins.ksp)
|
||||
}
|
||||
|
||||
import java.util.Properties
|
||||
|
||||
val keystorePropertiesFile = rootProject.file("keystore.properties")
|
||||
val keystoreProperties = Properties()
|
||||
if (keystorePropertiesFile.exists()) {
|
||||
keystoreProperties.load(keystorePropertiesFile.inputStream())
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "cz.bugsy.karemote"
|
||||
compileSdk = 36
|
||||
|
||||
signingConfigs {
|
||||
create("release") {
|
||||
storeFile = rootProject.file(keystoreProperties["storeFile"] as String)
|
||||
storePassword = keystoreProperties["storePassword"] as String?
|
||||
keyAlias = keystoreProperties["keyAlias"] as String?
|
||||
keyPassword = keystoreProperties["keyPassword"] as String?
|
||||
}
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
applicationId = "cz.bugsy.karemote"
|
||||
minSdk = 33
|
||||
@ -31,6 +48,7 @@ android {
|
||||
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||
"proguard-rules.pro"
|
||||
)
|
||||
signingConfig = signingConfigs.getByName("release")
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user