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 *.class
gen/ gen/
/android-signing-keystore.jks
/secrets.properties

View file

@ -9,15 +9,29 @@ ext.isSnapshot = false
ext.minimumSdkVersion = defaultMinSdkVersion ext.minimumSdkVersion = defaultMinSdkVersion
ext.git_version= ("git rev-parse --short HEAD".execute().text.trim()) 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 { android {
signingConfigs { signingConfigs {
release { release {
} }
prerelease { prerelease {
storeFile file('/home/jacques/.config/keystore') storeFile file("../android-signing-keystore.jks")
storePassword 'nifgk/Cr' storePassword secretProperties['signing_keystore_password']
keyAlias 'prerelase' keyAlias secretProperties['signing_key_alias']
keyPassword 'nifgk/Cr' keyPassword secretProperties['signing_key_password']
} }
} }
compileSdkVersion 29 compileSdkVersion 29

View file

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