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:
Pavel Baksy 2026-02-16 10:29:44 +01:00
parent 43395b509c
commit 4eac128b6a
2 changed files with 20 additions and 0 deletions

2
.gitignore vendored
View File

@ -10,3 +10,5 @@
.externalNativeBuild
.cxx
local.properties
keystore.properties
*.jks

View File

@ -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 {