title: Multi-module gradle project - Executing all Unit tests
body: <p>Our current set-up looks like this: One root-project with nine sub-modules, which are mixed between pure Java libraries and Android libraries.</p>
  
  <p>Each of the modules contains features, one of the modules is the <code>main</code> module which builds the Android app by merging all required modules.</p>
  
  <p>Each of the modules contains a lot of unit tests, and I'd like to execute them all in one gradle step. Right now I'm using <code>gradlew test</code> for this, but since (for example) the <code>main</code> module has multiple <code>product flavors</code> it is executing the unit tests in this module multiple times (for each flavor).</p>
  
  <p>Ideally, I'd like to only execute the <code>main</code> module unit tests once, for a certain flavor and signing configuration, but since the <code>testFlavorDebug</code> tasks are created while evaluating the project (as far as I know) I cannot define this before actually executing the evaluation.</p>
  
  <p>I've tried to find the tasks in <code>afterEvaluate</code> blocks, I've tried to loop over all modules, different combinations and ways, but I can't seem to figure out how to properly set this up.</p>
  
  <p>I'd be glad if someone has some pointers or experience with a set-up like this and could help me out. If you require additional information, let me know and I'll supply them, but as far as the project set-up it's pretty straight forward in regards to the multi-module setting.</p>