79554467

Date: 2025-04-04 04:38:44
Score: 2
Natty:
Report link

Only solution that I can think of is to add new client to the firebase debug project with package name "com.xyz.myproject.debug" and replace the google-services.json file with this client's json file. I guess, we can't change applicationId but can append using the property applicationIdSuffix which is available to us inside buildVariant closure.
So, my build variant will have :

 debug{
    //this build uses firebase project which is different from production
    signingConfig signingConfigs.debug
    applicationIdSuffix ".debug"
}

So this way, I do not have to change applicationId every time when I change the build variant. For Now, I will use this client but the question remains the same. Can't we replace the whole applicationId dynamically instead of appending?

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Vivek Gupta