Merge branch 'feature/Protect_Code_signing' into develop

This commit is contained in:
jacques 2022-01-01 18:47:28 +01:00
commit 29f4fc70ce
3 changed files with 22 additions and 6 deletions

2
.gitignore vendored
View file

@ -44,3 +44,5 @@ Thumbs.db
*.class
gen/
/android-signing-keystore.jks
/secrets.properties

View file

@ -9,15 +9,29 @@ ext.isSnapshot = false
ext.minimumSdkVersion = defaultMinSdkVersion
ext.git_version= ("git rev-parse --short HEAD".execute().text.trim())
// Try reading secrets from file
def secretsPropertiesFile = rootProject.file("secrets.properties")
def secretProperties = new Properties()
if (secretsPropertiesFile.exists()) {
secretProperties.load(new FileInputStream(secretsPropertiesFile))
}
// Otherwise read from environment variables, this happens in CI
else {
secretProperties.setProperty("signing_keystore_password", "${System.getenv('signing_keystore_password')}")
secretProperties.setProperty("signing_key_password", "${System.getenv('signing_key_password')}")
secretProperties.setProperty("signing_key_alias", "${System.getenv('signing_key_alias')}")
}
android {
signingConfigs {
release {
}
prerelease {
storeFile file('/home/jacques/.config/keystore')
storePassword 'nifgk/Cr'
keyAlias 'prerelase'
keyPassword 'nifgk/Cr'
storeFile file("../android-signing-keystore.jks")
storePassword secretProperties['signing_keystore_password']
keyAlias secretProperties['signing_key_alias']
keyPassword secretProperties['signing_key_password']
}
}
compileSdkVersion 29

View file

@ -11,8 +11,8 @@
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 260217704,
"versionName": "0.65.20211204-ac94daf",
"versionCode": 24065,
"versionName": "0.65.20220101-d04e132",
"outputFile": "app-preproduct-prerelease.apk"
}
],