Commit fa1ddd52 authored by George Tsiolis's avatar George Tsiolis 🏀 Committed by Eric Eastwood
Browse files

Fix gradle build variable quotes in config

Part of https://gitlab.com/gitlab-org/gitter/gitter-android-app/merge_requests/4

Previously it wouldn't build locally, only in CI.

Now it builds both locally and on CI
parent e97730f3
Pipeline #32429364 passed with stages
in 7 minutes and 44 seconds
......@@ -8,10 +8,10 @@ if (secretsPropertiesFile.exists()) {
}
// Otherwise read from environment variables, this happens in CI
else {
secretProperties.setProperty("oauth_client_id", System.getenv('oauth_client_id'))
secretProperties.setProperty("oauth_client_secret", System.getenv('oauth_client_secret'))
secretProperties.setProperty("oauth_redirect_uri", System.getenv('oauth_redirect_uri'))
secretProperties.setProperty("google_project_id", System.getenv('google_project_id') ?: "null")
secretProperties.setProperty("oauth_client_id", "\"${System.getenv('oauth_client_id')}\"")
secretProperties.setProperty("oauth_client_secret", "\"${System.getenv('oauth_client_secret')}\"")
secretProperties.setProperty("oauth_redirect_uri", "\"${System.getenv('oauth_redirect_uri')}\"")
secretProperties.setProperty("google_project_id", "\"${System.getenv('google_project_id') ?: "null"}\"")
}
android {
......@@ -25,10 +25,10 @@ android {
versionCode 81
versionName "3.2.0"
buildConfigField("String", "oauth_client_id", "\"${secretProperties['oauth_client_id']}\"")
buildConfigField("String", "oauth_client_secret", "\"${secretProperties['oauth_client_secret']}\"")
buildConfigField("String", "oauth_redirect_uri", "\"${secretProperties['oauth_redirect_uri']}\"")
buildConfigField("String", "google_project_id", "\"${secretProperties['google_project_id']}\"" ?: "null")
buildConfigField("String", "oauth_client_id", "${secretProperties['oauth_client_id']}")
buildConfigField("String", "oauth_client_secret", "${secretProperties['oauth_client_secret']}")
buildConfigField("String", "oauth_redirect_uri", "${secretProperties['oauth_redirect_uri']}")
buildConfigField("String", "google_project_id", "${secretProperties['google_project_id']}" ?: "null")
}
buildTypes {
release {
......
......@@ -13,7 +13,6 @@ buildscript {
}
}
subprojects {
group = 'im.gitter'
version = '1.0'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment