title: Gradle / Groovy Syntax and keywords
body: <p>Being new to both Gradle and Groovy I find myself having a hard time understanding the syntax of a build.gradle script.</p>
  <p>I understand (at least I think so) that build.gradle is plain groovy code used as DSL where the keywords are defined elsewhere.</p>
  <p>Please explain what the different parts are. Taken from the Tutorial:</p>
  <pre><code>defaultTasks 'distribution'
  
  task distribution &lt;&lt; {
      println &quot;We build the zip with version=$version&quot;
  }
  
  task release(dependsOn: 'distribution') &lt;&lt; {
      println 'We release now'
  }
  
  gradle.taskGraph.whenReady {taskGraph -&gt;
      if (taskGraph.hasTask(release)) {
          version = '1.0'
      } else {
          version = '1.0-SNAPSHOT'
      }
  }
  </code></pre>
  <p>e.g. I think I know <em>println</em> is a function. I know text in quotation marks is a string. I guess stuff in curly braces is a closure.
  But what is <code>release</code>/<code>distribution</code>? Is it a string, too? Is it a parameter to a function <code>task</code>? And why can I use it in <code>hasTask(release)</code> without quotation marks?</p>
  <p>So what exacly <em>is</em>: <code>defaultTasks</code>, <code>task</code>, <code>release</code>, <code>&lt;&lt;</code>, <code>gradle</code>, <code>whenReady</code>, <code>-&gt;</code>?</p>
  <p>Bonus: is there a groovy way to find out myself?</p>