Say we have four types of builds: debug, qa, beta, and release.
We can define dependencies for specific options:
dependencies { // These dependencies are only included for debug and qa builds debugCompile 'com.example:lib:1.0.0' qaCompile 'com.example:lib:1.0.0' }
Is there a way to compile these dependencies for multiple variations without repeating the artifact descriptor?
For example, I would like to do something like this:
dependencies { internalCompile 'com.example:lib:1.0.0' }
Where internalCompile will indicate that the library is included for building debug and qa .
I believe the solution is to define a new Gradle configuration, but if I create an internalCompile configuration, I am not sure how to ensure that these dependencies are only compiled for qa and debug assemblies.
source share