I need to do a configuration, with android and iOS that when doing the deployment accepts the change, it is configured with firebase, which when I create a project and configure it, gives me a file google-services.json and in iOS a GoogleService-Info.plist, what I need is that for different environments, which are created in firebase, for example I would like to add the file google-service.json for the production environment, but if it is in staging, use the google settings- service-staging.json and so on.
So when you call the change in the project's build.gradle, pass it a global variable (I don't know if it can really be done)
def servicesJSON = file('google-services'+enviroment+'.json')
Something like this, so that depending on what comes to you, you know in what environment they are deploying...
For flavors (stage,prod) you should place separate json files in corresponding directories for android project.