title: Gradle dependency to project in buildscript
body: <p>Trying to get my head around if it is possible to use Tasks from other projects in Gradle. Let's say ProjectB is a project with src/main/groovy containing com.MyTask, having parent ProjectA</p>
  
  <p>In build.gradle in ProjectC, also having parent ProjectA:</p>
  
  <pre><code>buildscript {
      dependencies{
          project(':ProjectB')
      }
  }
  </code></pre>
  
  <p>That seems to be legit, because introdusing a typo in "project(:'ProjectB')" fails hard. What also fails is introducing this line:</p>
  
  <pre><code>import com.MyTask
  </code></pre>
  
  <p>Is project-references not valid in buildscript closure? Also tried moving com.MyTask to buildSrc/src/main/groovy with the same amount of success. </p>