i have two tasks in my gradle file which looks like this:
task aExecutionTask << {
println 'hello says aExecutionTask, via the execution phase'
}
task aConfigurationTask{
println 'hello says aConfigurationTask, via the configuration phase'
}
now from the command line i run:
./gradlew aExecutionTask
and i was expecting it to only say the following:
hello says aExecutionTask, via the execution phase
but instead it ran both task and i got two print outs like this:
hello says aConfigurationTask, via the configuration phase
hello says aExecutionTask, via the execution phase
Why did it run the configuration phase when i am executing only the execution task using the << feature ? What if i want to run a task only and not have anything else called, how is that done ?
UPDATE: Thanks to the response here i wrote a blog to help anyone else: