title: Build.gradle: Access to 'project' exceeds its access rights
body: <p><strong>constants.gradle</strong></p>
  
  <pre><code>project.ext {
      minSdkVersion = 19
      compileSdkVersion = 28
      targetSdkVersion = 28
      buildToolsVersion = '28.0.3'
      supportLibraryVersion = '28.0.0'
  }
  </code></pre>
  
  <p><strong>build.gradle</strong> of the app</p>
  
  <pre><code>apply plugin: 'com.android.application'
  apply from: '../constants.gradle'
  
  android {
  
      compileSdkVersion project.ext.compileSdkVersion
      buildToolsVersion project.ext.buildToolsVersion
  
      defaultConfig {
      ...
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/mjSbP.png" rel="noreferrer"><img src="https://i.stack.imgur.com/mjSbP.png" alt="enter image description here"></a></p>
  
  <p>What is wrong here?</p>
  
  <p>Though it works fine for libraries in the same project:</p>
  
  <p><a href="https://i.stack.imgur.com/1RFj3.png" rel="noreferrer"><img src="https://i.stack.imgur.com/1RFj3.png" alt="enter image description here"></a></p>
  
  <p>Also everything is fine for the next lines in <code>defaultConfig</code> block</p>
  
  <pre><code>minSdkVersion project.ext.minSdkVersion
  targetSdkVersion project.ext.targetSdkVersion
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/bWphJ.png" rel="noreferrer"><img src="https://i.stack.imgur.com/bWphJ.png" alt="enter image description here"></a></p>
  
  <p>Android Studio 3.2, <code>classpath 'com.android.tools.build:gradle:3.2.0'</code>, <code>distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip</code></p>
  
  <p>Seems it didn't show such warnings with the previous Gradle or Studio</p>