且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在“调试”Firebase数据库上运行调试应用程序版本

更新时间:2023-10-11 23:04:46

I am not sure that it is the best practice.

You can use different google-services.json files.
I am investiganting about the current plugin (com.google.gms:google-services:3.0.0) if it supports build types. The previous one (com.google.gms:google-services:2.1.X) supported flavors but not types.

In any case you should be able to use somenthing like this:

app/src/release/google-services.json
app/google-services.json

In this case the plugin looks in the locations and stops when it finds a google-services.json file.

In this way you should be able to use different firebase apps for debug and release.