title: Access to variables in root gradle build.gradle from subproject build.gradle?
body: <p>I have a root build.gradle that contains some variables I want to have as global variables for some subprojects but not all sub projects</p>
  
  <p>I created a list:</p>
  
  <pre><code>List spring_dependencies = [
      "org.springframework:spring-beans:$springVersion",
      "org.springframework:spring-core:$springVersion",
      "org.springframework:spring-web:$springVersion",
  ]
  </code></pre>
  
  <p>I have some suprojects that do NOT use this for compilation, so I want to only add:</p>
  
  <pre><code>compile spring_dependencies
  </code></pre>
  
  <p>to the projects that actually need spring.</p>
  
  <p>How can I accomplish this global variable sharing in gradle?</p>