On 02.07.2016 09:06, Roman Shaposhnik wrote:
[...]
I'd really appreciate if somebody can explain what the first
exec resolves to and why:

$ cat build.gradle
exec {
   commandLine "echo", "foo"
}

this is a method call to exec.

println exec

this is asking for the property exec. Method calls without arguments must be done as exec() in Groovy. Furthermore properties and methods are mostly separate. So it is very possible the exec method exists and the property does not.

bye Jochen

Reply via email to