title: Gradle: Multi-projects & build WAR file
body: <p>I'm changing our project to use gradle as the build tool but am struggling with 2 issues;</p>
  
  <p>Context: It is a multi-project gradle configuration</p>
  
  <pre><code>:project-root
  ------:client //GWT Java Files &amp; GWT Centric resources, e.g. CSS, Images, ui-xml etc..
  ------:server //Server based logic, e.g. controllers, services, repositories etc.
  ------:web-app//NON GWT resources for the web-app, e.g. , web.xml, static pages, images 
  </code></pre>
  
  <p>1: To get the <code>gwtCompile</code> task to run in the <code>:client build.gradle</code>, I am adding it as a dependency on the war task, like so: </p>
  
  <pre><code>war{
      dependsOn ':client:compileGwt'
      from {'src/main/root-content'}
      webInf {from 'src/main/web-inf-content'}
  }
  </code></pre>
  
  <p>I don't like this so is there a simpler way in doing this so that the <code>gwtCompile</code> task gets called when the <code>javaCompile</code> tasks finishes in the <code>:client</code> project so the GWT Compiler has access to the generated bytecode? By simply putting <code>compile project(':client')</code> in :web-app dependencies calls the <code>javaCompile</code> but not the <code>gwtCompile</code> task (as I would have expected).. </p>
  
  <p>2: I struggling in getting the GWT JavaScript output from the <code>:client</code> project and for these files to be copied into the war file. I need something like the following in the <code>from</code> property:</p>
  
  <pre><code>war{
      from {'src/main/root-content','$:CLIENT/gwt-compiler-js-output-dir-as-declared-in-client-build-file}
      webInf {from 'src/main/web-inf-content'}
  }
  </code></pre>
  
  <p>Many Thanks in advance,</p>
  
  <p>Ian.</p>