title: How to use gradle properties in build.gradle
body: <p>When I run this task:</p>
  <pre><code>task tmpTask &lt;&lt; {
      project.properties.each {println &quot;   $it&quot;}
  }
  </code></pre>
  <p>I see:</p>
  <pre class="lang-none prettyprint-override"><code>org.gradle.java.home=/usr/lib/jvm/java-6-oracle
  </code></pre>
  <p>But how to use this variable? I've tried both:</p>
  <pre><code>task tmpTask &lt;&lt; {
      println org.gradle.java.home
      println project.properties.org.gradle.java.home
  }
  </code></pre>
  <p>But none of this works. First print gives error:</p>
  <pre class="lang-none prettyprint-override"><code>Could not find property 'org' on task ':tmpTask'.
  </code></pre>
  <p>while second fails with:</p>
  <pre class="lang-none prettyprint-override"><code>Cannot get property 'gradle' on null object
  </code></pre>