So I am trying to architect my project based on a MVP pattern for Android. I have used this excellent article as my base. While it works great, I was wondering how would I be able to maintain different build flavors(Staging & Production) across modules.
More details -
I have a module named common which contains a Constants.java file which has URL's and other base settings/constants. What I want to be able to do is have different Constants.java file for staging and production. In the same module, it is easily done, but since my common module is separate from my main app module, I am not sure how would I achieve this.
Any pointers would be appreciated. Thanks
Though I haven't done this myself yet, according to the documentation, you can have different flavors for your library module and reference them from a flavored app module as follows: