title: Gradle - make "assemble" depend on "clean" for all projects
body: <p>I have several unrelated Java projects built with gradle, some of which are assembled into a <code>jar</code> file, others, into a <code>war</code>.</p>
  
  <p>I'd like the <code>assemble</code> task of all projects to depend on the <code>clean</code> task since we've had issues with various old classes getting into assembled jars/wars from the build folder cache. Is there a way of doing that without adding <code>assemble.dependsOn clean</code> to each and every <code>build.gradle</code>?</p>