How to test android application on Circle CI with Google Services Gradle Plugin

前端 未结 1 1418
星月不相逢
星月不相逢 2021-02-09 10:32

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

1条回答
  •  失恋的感觉
    2021-02-09 10:56

    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/

    • encode your google-services.json in base64. Make sure to remove any spaces from the encoded string
    • put this to Environment Variable in Project settings of Circle CI ( I named it GOOGLE_SERVICES)
    • 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

    0 讨论(0)
提交回复
热议问题