Skip to content
This repository has been archived by the owner on Oct 7, 2024. It is now read-only.

Moving Firebase crash configuration to CI #1089

Merged
merged 1 commit into from
Jun 6, 2019
Merged

Conversation

langsmith
Copy link
Contributor

@langsmith langsmith commented Jun 5, 2019

Resolves #926 by removing hardcoded values and using BuildConfig instead. The values are now set via CircleCI environment variables.

Using blank_place_holder_string means that FIREBASE_APP_ID and FIREBASE_API_KEY don't have to be set locally to compile the app on a local computer. I'd still advise Mapboxers and others who interact with this app on a frequent basis, to add the following to the Gradle user home folder's gradle.properties file (similar to https://docs.mapbox.com/help/troubleshooting/private-access-token-android-and-ios/#non-git-option) .

FIREBASE_APP_ID="ID_HERE"
FIREBASE_API_KEY="KEY_HERE"

cc @zmully @Guardiola31337

@langsmith langsmith self-assigned this Jun 5, 2019
@@ -46,8 +46,8 @@ android {
productFlavors {
global {
isGlobal = true
resValue "string", "firebase_app_id", "1:557332920931:android:bdf11618ae45dd61"
resValue "string", "firebase_api_key", "AIzaSyCGCYLyLoi31Hv-pkBO0D51zCyxjngJbz8"
resValue "string", "firebase_app_id", System.getenv('FIREBASE_APP_ID') ? System.getenv('FIREBASE_APP_ID') : "blank_place_holder_string"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if you just have System.getenv('FIREBASE_APP_ID')? (without the ternary expression / default value)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Build Config field cannot have a null parameter

Screen Shot 2019-06-06 at 6 28 16 AM

@langsmith langsmith marked this pull request as ready for review June 6, 2019 16:34
@langsmith langsmith force-pushed the ls-firebase-key-fix branch from 214f1d1 to ede7113 Compare June 6, 2019 16:45
@langsmith langsmith merged commit f7dd816 into master Jun 6, 2019
@langsmith langsmith deleted the ls-firebase-key-fix branch June 6, 2019 17:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move firebase configuration to CI
2 participants