As many of you probably know, the Android Gradle plugin had support for build types and variants from the beginning. Their implementation meant two things:
- The creation of a BuildConfig.java class at build time, which contains information about the current build type/flavor and can be accessed from your code (ex, check BuildConfig.DEBUG if true as a switch in your code). 2. Support for different versions of a file depending on the build type/flavor. (ex, src/main/config.file for release, src/debug/config.file for debug)
My question is, are these 2 features going to be supported in the official Gradle implementation of build variants as well? If not, please consider doing so, as literally any Java project can and would benefit from having these 2 features. Currently I’m working on a web app and I seriously need feature 2, if not even both. As currently neither Maven, nor Gradle support something like this, implementing it officially for Gradle would completely blow Maven out of the water.