title: Gradle extension properties in subproject
body: <p>I have a Java project (builded with Gradle 4.6) which contains few modules and every module has it's own build.gradle. Also there is build.gradle in the main project. So the structure looks like:</p>
  
  <pre><code>/
  /build.gradle
  /module-number-one/build.gradle
  /module-number-two/build.gradle
  </code></pre>
  
  <p>Everything works good, but I cannot access extension properties from main script. For example in <code>/module-number-one/build.gradle</code> I have:</p>
  
  <pre><code>ext {
     myProp = 'some value'
  }
  </code></pre>
  
  <p>And when I do:</p>
  
  <pre><code>allprojects.findAll { Project project -&gt;
      println(project.ext.has('myProp'))
      // or
      println(project.hasProperty('myProp'))
      // or
      println(project
          .getExtensions()
          .getExtraProperties()
          .getProperties()
          .contains('myProp'))
  }
  </code></pre>
  
  <p>I receiving false. Is it possible to access ext only from the same file or I'm doing something wrong?</p>