[英]Using a different Application Id for debug/QA (via gradle Build Flavor) and Google App Engine
I'm thinking of changing the name of my application id by appending "-DEBUG" which allows me to install both a release and a debug version of it on the same device (and also helps with stuff like Crashlytics filtering though there are other ways to deal with that) but it poses a problem with the google app engine backend since all the security features are tied to the application name as they should be. 我正在考虑通过附加“ -DEBUG”来更改我的应用程序ID的名称,这使我可以在同一设备上安装它的发行版和调试版(并且还可以通过其他方法来解决Crashlytics过滤问题以解决此问题),但由于所有安全功能均应按原样绑定到应用程序名称,因此它对Google App Engine后端造成了问题。
I'm thinking of two possible solutions but wanted to see if anyone else has hit this issue and may have a more elegant approach. 我正在考虑两个可能的解决方案,但想看看是否有人遇到了这个问题并且可能有一个更优雅的方法。
1) instead, I can change the app version via gradle versionNameSuffix though this doesn't allow the two version of the app to co-exist 1)相反,我可以通过gradle versionNameSuffix更改应用程序版本,尽管这不允许应用程序的两个版本共存
2) register both app ids with the app engine backend 2)在应用引擎后端注册两个应用ID
Am I thinking about this the wrong way? 我在想这个错误的方式吗? In general, how do people deal with Release vs QA instances of their apps and setting up corresponding versions of their backends?
总的来说,人们如何处理其应用的Release与QA实例并设置其后端的相应版本? Also, do the Release vs QA backend instances share the same data store?
另外,Release和QA后端实例是否共享相同的数据存储? Thanks.
谢谢。
Personally I've always used the suffix approach you're considering, except with a more systematic set of suffixes ( -dev
if there's a single "in development" version, -dev-<developersusername>
if each developer in the team gets a separate one, -staging
, -qa
, -canary
, -prod
and the like, depending on the exact deployment workflow for a given app). 就我个人而言,我一直都在使用您正在考虑的后缀方法,除了带有一组系统性的后缀(如果有单个“开发中”版本,
-dev-<developersusername>
-dev
如果团队中的每个开发人员都有一个单独的后缀,则使用-dev-<developersusername>
一个-staging
, -qa
, -canary
, -prod
等,具体取决于给定应用程序的确切部署工作流程。
And, any external system I need to use from the various versions, such as an app engine backend in your case, I register all relevant versions on. 而且,我需要使用各种版本的任何外部系统(例如您所用的应用引擎后端),都在其上注册所有相关版本。 Typically a small, simple script makes light work of that!-)
通常,一个小的,简单的脚本可以简化工作!-)
I would consider it very risky to share a datastore or other persistent bunch of data between a production version (whose data are presumably precious and absolutely to be preserved) and in-development versions that are quite possibly buggy -- couldn't one of the somewhat-expected bugs in the new versions wipe out precious to-be-preserved production data? 我认为在生产版本(其数据可能是宝贵的并且绝对要保留)和开发版本(很可能是错误的)之间共享数据存储或其他持久性数据集是非常冒险的-不能新版本中有些意外的错误会抹去珍贵的保留数据?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.