I've inherited a pretty big and old project with a tiny bit of technical debt which is still under active development. A couple of months ago we made the jump from Eclipse+Ant to Android Studio+Gradle. I don't have much experience with gradle now and had a lot less back then, so a colleague (who is also working on the project now) helped with the porting.
The project is actually 4 apps with a couple of partially shared libraries; i.e. app1 and app2 use library1, while app3 and app4 use library2 which depends on library1; and app1 and app3 (but not 2 and 4) use library3, etc. In the beginning app1 and -2 were practically the same app with minor differences (skinning), same with app3 and -4; much of the business logic is the same in all 4 apps, but over time functionality (UI layer and features - everything except the business logic) began to diverge more and more and today there are as many differences as commonalities.
My colleague lobbied for gradle flavors because that's the way it's done with gradle, but I've always been sceptical: those are not simple paid+unpaid versions or the same app with different skinning and they're growing further apart with each month. Nowadays, a feature is rarely implemented in all four apps; usually only in one or two of them.
In the past, a lot of the app-X only functionality has been built into the libraries with conditionals, which is icky (leads to spaghetti code), while I now try to move app-X only functionality into the top level flavor. The problem i'm running into is that the IDE and many tools don't work that well with flavors when it comes to code analysis and refactoring. Android Lint marks resources used by a different flavor as unused, usage search and most of the refactoring tools don't work well over flavor boundaries, ... - I'm changing one method in a shared library and the inactive flavors break without the IDE protesting - unless I manually switch flavors (or, in practise, jenkins informs me about failed builds). Refactoring is pretty much impossible right now which doesn't help with the debt at all.
So I'm thinking about moving to different app modules within the same project; my colleague protests because that's how it's done in eclipse but not in android studio+gradle and I'm just not "getting it" - but that's pretty much his only point.
Am I really just not getting it or is my colleague abusing the flavor system for something it was not designed for? Are there any downsides or pitfalls of using top level app modules instead of flavors?