I love how Android Studio integrates with Gradle so you can create different layout configurations (flavors). In fact, you can duplicate a class using the same package name, but where the root package is under a folder that matches the taste of the build. For example, if I have a production flavor and a development flavor, I might have folders like this:
Production flavor: app> src> production> java> com> mycompany> file.java
Taste of development: app> src> development> java> com> mycompany> file.java
Android Studio copes with this task perfectly in the IDE and allows you to easily choose which flavor to build and will compile your code from those sources that match the chosen taste.
I use IntelliJ to create web development, but IntelliJ does not support the same support for Gradle as Android Studio does. I have no problem doing Gradle tasks manually if I need to.
Has anyone used Gradle to manage web development so that you can create variations (flavors)? Perhaps there is a Gradle plugin for this? If not, I suppose I could write my own.
source share