braze-inc / braze-expo-plugin

Other
11 stars 10 forks source link

fix(android): allow google-services path to be dynamically set #2

Closed vineyardbovines closed 1 year ago

vineyardbovines commented 2 years ago

Hey! Thanks for the expo plugin here.

It would be helpful if the google-services.json path could be dynamically set for environment secrets and CI purposes. The use case in mind here is with EAS:

  1. google-services.json file is uploaded to EAS secrets
  2. EAS creates a temp file path at build time to the file
  3. In the app's app.config.js, call the file path created by EAS, which can be referenced with process.env.
// app.config.js
[
  "@braze/expo-plugin",
  {
    // ...
    enableFirebaseCloudMessaging: true,
    googleServicesJsonSourcePath: process.env.NAME_OF_GOOGLE_SERVICES_IN_EAS_SECRETS
  },
],

Thanks for considering!

wesleyorbin commented 1 year ago

Hi @gretzky. Apologies for the delay. We just released v0.6.0, which now uses the built-in googleServicesFile expo prop to set the path to the google-services file and will allow you to set it using an environment variable. Thank you for your contribution!