title: Gradle multiproject define dependency on root project
body: <p>I have a multi project gradle build, configured in this way:  </p>
  
  <pre><code>root
    |
    |---- projectA
    |
    |---- projectB
  </code></pre>
  
  <p>I want to declare in the <code>root/build.gradle</code> a dependency for all nested projects, this is the file:  </p>
  
  <pre><code>subprojects {
        version = '1.0-SNAPSHOT'
        repositories {
             mavenLocal()
             mavenCentral()
             maven {
                 url 'https://repository.jboss.org/nexus/content/groups/public-jboss/'
             }
         }
  }
  
  allprojects {
      dependencies {
          compile 'org.projectlombok:lombok:1.12.2'
      }
  }
  </code></pre>
  
  <p>But when I execute the build, I have:</p>
  
  <pre><code>* What went wrong:
  </code></pre>
  
  <p>A problem occurred evaluating root project 'code'.</p>
  
  <pre><code>No signature of method:
  org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.compile() is applicable for argument types: (java.lang.String) values: [org.projectlombok:lombok:1.12.2]
  </code></pre>
  
  <p>Possible solutions: module(java.lang.Object)</p>
  
  <p>What I am doing wrong?</p>