Configure release signing key mechanism and ignore keystore files in .gitignore

This commit is contained in:
2026-06-23 19:50:35 +02:00
parent 2756323b29
commit 012e1ab865
2 changed files with 13 additions and 1 deletions
BIN
View File
Binary file not shown.
+12
View File
@@ -104,6 +104,14 @@ android {
keyAlias 'androiddebugkey' keyAlias 'androiddebugkey'
keyPassword 'android' keyPassword 'android'
} }
release {
if (project.hasProperty('SCHNAPPIX_RELEASE_STORE_FILE')) {
storeFile file(SCHNAPPIX_RELEASE_STORE_FILE)
storePassword SCHNAPPIX_RELEASE_STORE_PASSWORD
keyAlias SCHNAPPIX_RELEASE_KEY_ALIAS
keyPassword SCHNAPPIX_RELEASE_KEY_PASSWORD
}
}
} }
buildTypes { buildTypes {
debug { debug {
@@ -112,7 +120,11 @@ android {
release { release {
// Caution! In production, you need to generate your own keystore file. // Caution! In production, you need to generate your own keystore file.
// see https://reactnative.dev/docs/signed-apk-android. // see https://reactnative.dev/docs/signed-apk-android.
if (project.hasProperty('SCHNAPPIX_RELEASE_STORE_FILE')) {
signingConfig signingConfigs.release
} else {
signingConfig signingConfigs.debug signingConfig signingConfigs.debug
}
def enableShrinkResources = findProperty('android.enableShrinkResourcesInReleaseBuilds') ?: 'false' def enableShrinkResources = findProperty('android.enableShrinkResourcesInReleaseBuilds') ?: 'false'
shrinkResources enableShrinkResources.toBoolean() shrinkResources enableShrinkResources.toBoolean()
minifyEnabled enableMinifyInReleaseBuilds minifyEnabled enableMinifyInReleaseBuilds