title: gradle - when i execute a task why is the configuration phase being called also
body: <p>i have two tasks in my gradle file which looks like this:</p>
  
  <pre><code>    task aExecutionTask &lt;&lt; {
  
      println 'hello says aExecutionTask, via the execution phase'
  
  }
  
  
  
  
  task aConfigurationTask{
  
      println 'hello says aConfigurationTask, via the configuration phase'
  
  
  }
  </code></pre>
  
  <p>now from the command line i run:
  <code>./gradlew aExecutionTask</code> and i was expecting it to only say the following:</p>
  
  <pre><code>hello says aExecutionTask, via the execution phase
  </code></pre>
  
  <p>but instead it ran both task and i got two print outs like this:</p>
  
  <pre><code>hello says aConfigurationTask, via the configuration phase
  hello says aExecutionTask, via the execution phase
  </code></pre>
  
  <p>Why did it run the configuration phase when i am executing only the execution task using the &lt;&lt; feature ? What if i want to run a task only and not have anything else called, how is that done ?</p>
  
  <p>UPDATE: Thanks to the response here i wrote a <a href="http://j2emanue.blogspot.ca/2016/01/gradle-build-lifecycle.html" rel="nofollow">blog</a> to help anyone else:</p>