I have a library project and a application. I\'d like to have 2 product flavours (store, dev) for both library and application. When I build the store<
I had a similar issue a while ago, what happens is that the compiler ignores product flavors for the library project. Moreover, even when you add more build types, it keeps looking for and compiling release/debug sources.
The reason is simple:
The compiler will never look for anything you put in the store directory of your library project. So, you need to find a way around it.
One way around it would be to include both implementations with a level of abstraction in your library (through interfaces, multiple constructors, etc), and then let your app project decide which part of the library to run. If you use proguard, it will automatically get rid of the unneeded code, if it is decoupled well enough (and possibly so even if it is not).