sec: load release signing credentials from local.properties or env instead of hardcoded values

This commit is contained in:
Jannik committed 2026-09-08 18:23:42 +02:00
1 parent 1c07eae37b
commit 2b710f3f65
2 files changed
+24 -4

No files matched your search

+12 -2
View File
@@ -107,9 +107,19 @@ android {
release {
storeFile file("../../schnappix-upload-key.keystore")
storePassword "#O0he7k00O0he7k00!"
def localProperties = new Properties()
def localPropertiesFile = rootProject.file("local.properties")
if (!localPropertiesFile.exists()) {
localPropertiesFile = rootProject.file("../local.properties")
}
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
storePassword localProperties.getProperty("RELEASE_STORE_PASSWORD") ?: System.getenv("RELEASE_STORE_PASSWORD") ?: ""
keyAlias "schnappix-alias"
keyPassword "#O0he7k00O0he7k00!"
keyPassword localProperties.getProperty("RELEASE_KEY_PASSWORD") ?: System.getenv("RELEASE_KEY_PASSWORD") ?: ""
}
}
+12 -2
View File
@@ -8,9 +8,19 @@ module.exports = function withAndroidSigning(config) {
const signingConfig = `
release {
storeFile file("../../schnappix-upload-key.keystore")
storePassword "#O0he7k00O0he7k00!"
def localProperties = new Properties()
def localPropertiesFile = rootProject.file("local.properties")
if (!localPropertiesFile.exists()) {
localPropertiesFile = rootProject.file("../local.properties")
}
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
storePassword localProperties.getProperty("RELEASE_STORE_PASSWORD") ?: System.getenv("RELEASE_STORE_PASSWORD") ?: ""
keyAlias "schnappix-alias"
keyPassword "#O0he7k00O0he7k00!"
keyPassword localProperties.getProperty("RELEASE_KEY_PASSWORD") ?: System.getenv("RELEASE_KEY_PASSWORD") ?: ""
}
`;