Update app/build.gradle file to sync without the requirement for a keystore.properties

This change will only effect fresh imports and people who don't setup a keystore.properties

When building debug, there is not a strict reason why we need a custom keystore.

This change will allow people to pull the code and start developing right away without configuring keystores
This commit is contained in:
Gannon
2024-01-03 21:52:21 -05:00
parent f95c76ff8f
commit bf26d01cbb

View File

@ -8,7 +8,9 @@ plugins {
def keystorePropertiesFile = rootProject.file("app/external/keystore.properties");
def keystoreProperties = new Properties()
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
android {
compileSdk 33
@ -26,24 +28,28 @@ android {
}
}
signingConfigs{
release{
signingConfigs {
release {
keyAlias 'key0'
storeFile file('external/omnivore-prod.keystore')
storePassword keystoreProperties['prodStorePassword']
keyPassword keystoreProperties['prodKeyPassword']
}
debug{
keyAlias 'androiddebugkey'
storeFile file('external/omnivore-demo.keystore')
storePassword keystoreProperties['demoStorePassword']
keyPassword keystoreProperties['demoKeyPassword']
debug {
if (keystoreProperties['demoStorePassword'] && keystoreProperties['demoKeyPassword']) {
keyAlias 'androiddebugkey'
storeFile file('external/omnivore-demo.keystore')
storePassword keystoreProperties['demoStorePassword']
keyPassword keystoreProperties['demoKeyPassword']
}
}
}
buildTypes {
debug{
signingConfig signingConfigs.debug
debug {
if (signingConfigs.debug.storeFile) {
signingConfig signingConfigs.debug
}
buildConfigField("String", "OMNIVORE_API_URL", "\"https://api-demo.omnivore.app\"")
buildConfigField("String", "OMNIVORE_WEB_URL", "\"https://demo.omnivore.app\"")
buildConfigField("String", "OMNIVORE_GAUTH_SERVER_CLIENT_ID", "\"267918240109-eu2ar09unac3lqqigluknhk7t0021b54.apps.googleusercontent.com\"")