G’day.
I have an Android Gradle project which consists of the Android module and 3 Java library modules (that the Android module depends on).
The Android Gradle plugin supports build types (debug, release, etc) and I’d like to be able to use these build types for the library projects as well, so that if I enable debug, it would use debug source sets for all 4 modules.
However, I’m not quite sure how to make this happen for the pure Java modules. I know I can define new sourceSets, but is there anyway to configure the Gradle build scripts so that the sourceSets of the Java modules change when I change build type for the Android module?