用android和firebase分离dev和prod吗? [英] Seperating dev and prod with android and firebase?

查看:72
本文介绍了用android和firebase分离dev和prod吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近在Play商店中部署了一个应用,并且我正在使用Firebase作为后端.但是,现在我想向该应用程序添加一些功能,并希望创建不同的环境,以便在发布到生产环境之前可以在类似的环境中测试该应用程序.

I recently deployed an app to the play store and i am using firebase as backend. However, now I want to add some features to the app and want to create different environments so that i can test the app in a similar environment before releasing to production.

我在线浏览了这些链接,但是我有一些疑问.

I went through these links online but I have some doubts.

  1. https://medium.com/@ Miqubel/multiple-build-types-in-firebase-on-android-6f6715f6dd83
  2. https://web.archive.org/web/20160310115701/https://www.firebase.com/blog/2015-10-29-managing-development-environments.html

当前PROD中的应用已配置了数据库,功能和存储.因此,我的目标是获得该设置的镜像,通过它我可以测试我的应用程序,而不会影响PROD数据库设置中的任何内容.

The app currently in PROD has database, functions and storage configured. So my goal is to have a mirror image of this setup through which i would test my app without affecting anything in the PROD database setup.

到目前为止,我发现的是:

1:我的构建gradle中需要具有不同的构建类型.

1: I need to have different build types in my build gradle.

2:以某种方式使我的DEV和PROD的不同版本指向firebase上的不同数据库.

2: Somehow make my different build for DEV and PROD point to different databases on firebase.

困惑:

我应该在firebase上创建两个不同的项目,还是在一个项目中拥有两个应用程序?

Should I create two different projects on firebase or have two apps in 1 project?

当我们在一个Firebase项目中有两个应用程序时,它具有单独的数据库还是单个共享数据库?

When we have two apps in one firebase project does it have separate database or a single shared database?

推荐答案

对于要单独测试的每个环境,建议有不同的项目.不要将同一项目用于开发和生产,因为在开发过程中所做的更改可能会在生产中引起问题.

It's recommended to have different projects for each environment that you want to test separately. Don't use the same project for development and production, because your changes during development could cause problems in production.

请阅读此博客获取更多信息.

这篇关于用android和firebase分离dev和prod吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆