How to emulate Android's productFlavors in a pure java gradle module?
问题 I need three flavors: fake staging prod fake will provide classes like FakeUser , FakeUserDb - it's very important that these classes are not compiled into the prod flavor. prod and staging are completely identical, except that I need to compile a different String url into prod vs staging . So, I need to create an "abstract" real flavor that both prod and staging inherit. This can be easily done with the android gradle plugin, but how can I do it in a pure java gradle module? 回答1: For each