title: Running Gradle root project task from subproject
body: <p>I am facing the following problem. I have multi module Gradle project. One module is my root project and the second module are integration tests.</p>
  
  <p>In order for my integration tests to run, a copy task needs to run first in order to move some assets to a folder on the root directory of the project.</p>
  
  <p>I already have such a task defined on my root project which when I try to invoke does nothing (I have tried several different way of calling it).</p>
  
  <p>Since this was failing I went ahead and created the following task on the subproject itself:</p>
  
  <pre><code>task prepareTestAssets(type: Copy) {
      description = "Copies the needed jars from the root project output build dir"
      copy {
          from rootProject.configurations.compileClasspath
          into ("${rootProject.rootDir}/classes")
          rename { fileName -&gt; fileName.replace '-internal', '' }
          rename 'ads-(.+).jar', 'ads.jar'
          fileMode 0755
      }
  
      copy {
          from ("${rootProject.buildDir}/libs")
          into ("${rootProject.rootDir}/classes")
          fileMode 0755
      }
  }
  </code></pre>
  
  <p>Which I by having another task depend on it. My goal for this is to have it copy the root project classes as well as the jar generated under <code>build/libs</code> into a single directory (needed by the integration tests to run).</p>
  
  <p>My problem is that when this runs, it seemingly finds no source and keeps failing.</p>
  
  <p>Can anyone help me troubleshoot why I cannot copy the root project's assets from the context of the subproject</p>