I'm developing android application with Google Services Gradle Plugin(It is needed from Firebase), and the plugin needs google-services.json.
I think the json file should not be under the control of git because it have some values that should be concealed(ex. api_key), but Circle CI needs the one.
If google-services.json can look up environment variables, the problem can solve.(values are concealed on git repository and Circle CI can get values from environment variables).
But, I can't find mechanism of look up environment variables from google-services.json.
I have three questions.
1) Should google-services.json really be ignored from VCS?
2) Does Google Services Gradle Plugin have the mechanism of look up environment variables from google-services.json?
3) Is there other ways of refer google-services.json from Circle CI?
1) Yes, it should - it contains sensitive information like your API key.
2) I don't think so
3) You can use similar aproach as in https://circleci.com/docs/2.0/google-auth/
in your circle.yml decode this variable to google-services.json file in your app directory. In my case I use
echo $GOOGLE_SERVICES | base64 --decode > ~/${HOME}/app/google-services.json
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With