title: gradle build uses 100% CPU and blocks UI
body: <pre><code>gradle clean assembleDebug
  </code></pre>
  
  <p>It takes around 2 minutes to build and it uses 100% CPU blocking everything until the build ends.
  It happens from command line and from android studio as well. both installed version or gradle wrapper.</p>
  
  <p>It's extremely frustrating. Need help.</p>
  
  <p><a href="https://stackoverflow.com/questions/30024910/android-studio-1-2-gradle-is-very-slow">this</a> didn't work</p>
  
  <p><strong>Update</strong></p>
  
  <p><strong>gradle version 2.7</strong></p>
  
  <p><strong>gradlew version 2.8</strong></p>
  
  <p><strong>android studio version 1.5.1</strong></p>