问题
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:
- 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. - Do nothing, so if somebody interested they have to do it manually.
- 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)
Maybe, Fabric has some dummy keys just not to fail the build without them (I haven't found them)?
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