title: Gather JAR files from dependencies in gradle
body: <p>I have project A that has dependencies on external jars. It compiles fine, I can upload its jar file into an Ivy repository as 'group:A:1.0'. Ivy.xml shows the right external dependencies.</p>
  
  <p>I then have project B, which has a compile dependency 'group:A:1.0' (i.e. not the local project, but the remote artifact)</p>
  
  <p>I want to be able to copy all the jar files that A depends on, all those that B depends on, and put them all in a folder.</p>
  
  <p>task copyDeps(type: Copy) {
      from(project.configurations.runtime) 
      into project.file(project.ext.myDir)
  }</p>
  
  <p>The problem I'm running into is that only the jars that B depend on get found (including A). How do I get the jars A depend on.</p>