title: Access project build variables in init.gradle task
body: <p>I am trying to figure out, how to set variables in build.gradle and access that varible in init.gradle script.</p>
  
  <p>Please find below sample build script :-</p>
  
  <pre><code>gradle.allprojects{
  
      task CommonTasks{
          println "CommonTasks - loaded"
      }
  
      CommonTasks.doFirst{
          println "CommonTasks - doFirst : here i want to use variable, that is declared in project build"
      }
  
      CommonTasks.doLast{
          println "CommonTasks - doLast"
      }
  
  }
  </code></pre>
  
  <p>Also find below sample project build :-</p>
  
  <pre><code>apply plugin : 'java'
  
  //some-where here i want to pass a variable in CommonTasks
  clean.dependsOn CommonTasks
  </code></pre>
  
  <p>Please suggest, how to access project build.gradle variables(say, String or File type for example) on init.gradle page.</p>