title: Gradle builds really slow with a multi-project structure
body: <p>When building with gradle on a multi-project setup containing roughly 140 projects/libraries, the build time took 1 hour and 22 minutes. And i was using <code>--parallel</code>. And our ANT build takes less than 20 minutes without parallel building.</p>
  
  <p>Here is exactly what i did.</p>
  
  <pre><code>./gradlew clean
  ./gradlew build --parallel
  </code></pre>
  
  <p>I did a little testing it seems like the dexing is taking the longest amount of time. Is there a way to get the gradle process to re-use the stuff it has already dexed? If the libraries have already been built, it should re-use the already dexed libraries.</p>
  
  <p>I saw the option <code>--no-rebuild</code>, but when i run with that option it says the following</p>
  
  <pre><code>File '/path/to/project/build/libs/project.aar' specified for property 'bundle' does not exist.
  </code></pre>
  
  <p>I replaced the file path and project name with generic stuff.</p>
  
  <p>Using Gradle 1.9-rc-3</p>
  
  <hr>
  
  <p>Additional information(15 Jan 2014):</p>
  
  <p><code>preDexDebug</code> and <code>preDexRelease</code> took a VERY long time on each project. Much longer than any other task.</p>
  
  <hr>
  
  <p>Progress(15 Jan 2014):</p>
  
  <p>Ok, for now, i put <code>preDexLibraries = false</code> into all of the <code>build.gradle</code> files. However, i still would like to know a centralize place that i can put that entry and it affect all the other <code>build.gradle</code> files.</p>
  
  <p>However, now <code>dexRelease</code> and <code>dexDebug</code> are taking a long time. Is there any way that i can tell the build to only do the <code>dexDebug</code> or <code>dexRelease</code> and skip the other one?</p>
  
  <hr>
  
  <p>Progress(15 Jan 2014):</p>
  
  <p>Using <code>assembleDebug</code> worked. However, it still seems like it is not re-using the already dexed libraries. Because dexing is still taking forever. It takes about a minute for each project. <strong>Is there a way to get gradle to re-use the already dexed libraries? Or is there a different reason why the build is still taking about an hour?</strong> Our ANT process takes less than 15 minutes.</p>