title: gradle merge configurations.testRuntime with configurations.testCompile in copy
body: <p>I'd like to copy some of my dependencies (retrieved from maven) to specific location in my <code>build.gradle</code> file.</p>
  
  <p>If I iterate only testRuntime it works OK. My code is:</p>
  
  <pre><code>dependencies {
    testRuntime 'p6spy:p6spy:2.+'
    testRuntime 'com.h2database:h2:1+'
  }
  
  task foo {
      copy {
          from configurations.testRuntime.findAll { it.getAbsolutePath().contains("/p6spy/") || it.getAbsolutePath().contains("/h2/") }
          into "outputdir"
      }
  }
  </code></pre>
  
  <p>however I'd like to go for <code>testCompile</code> rather than <code>testRuntime</code> in case of <code>h2</code> dependency. So I tried:</p>
  
  <pre><code>dependencies {
    testRuntime 'p6spy:p6spy:2.+'
    testCompile 'com.h2database:h2:1+'
  }
  
  task foo {
      copy {
          from [ configurations.testRuntime, configurations.testCompile ].flatten().findAll { it.getAbsolutePath().contains("/p6spy/") || it.getAbsolutePath().contains("/h2/") }
          into "outputdir"
      }
  }
  </code></pre>
  
  <p>However here I get error:</p>
  
  <pre><code>No such property: from for class: org.gradle.api.internal.file.copy.CopySpecWrapper_Decorated
  </code></pre>
  
  <p>I guess trouble is in my merging of the 2 lists here. Still can't figure out the right way.</p>