Creating dummy Fabric Api keys for an open source project

旧时模样 提交于 2019-12-13 01:43:23

问题


I am working on an open-source project (Kotlin, Toothpick, Clean Architecture - nowadays hype themes, but that's not the question :). I am using Fabric's Crashlytics, so I hid the API and secret keys into fabric.properties, according to the the official docs (and here are some details)

The question is what is the best way to provide some dummy keys to collaborators without needing to solve merge conflicts in this properties file? If I publish the project without this file, it will crash on build because Fabric won't find needed keys.

The options I see:

  1. Attach a fabric.properties with pre-defined API and Secret keys that are not from the actual app dashboard, so if somebody (intentionally or not) brakes analytics or something, their data will be in a separate dashboard.
  2. Do nothing, so if somebody interested they have to do it manually.
  3. Provide the real keys to the repo (I don't think that it is a good idea, but if you have other experience, share it please)
  4. Maybe, Fabric has some dummy keys just not to fail the build without them (I haven't found them)?

  5. Something else?


回答1:


Mike from Fabric here. One option you could take is to disable initializing Fabric unless the keys are present or if a value read in at build time is present or not. The best implementation would depend on your specific setup so apologies for being a little vague.



来源:https://stackoverflow.com/questions/47880326/creating-dummy-fabric-api-keys-for-an-open-source-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!