title: Can Gradle jar multiple projects into one jar?
body: <p>Can Gradle jar multiple projects into one jar ?</p>
  
  <p>I know you can do it for a single project using a method like this:</p>
  
  <pre><code>task packageTests(type: Jar) {
    from sourceSets.test.classes
  }
  </code></pre>
  
  <p>But how does  a person zip up multiple sub-projects into one jar?</p>
  
  <p>I tried this and it doesn't work:</p>
  
  <pre><code>task packageTests(type: Jar) {
    from project(':core').sourceSets.main.classes
    from project(':core:google').sourceSets.test.classes
    from project(':core:bing').sourceSets.test.classes
  }
  </code></pre>