groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jochen Theodorou <blackd...@gmx.org>
Subject Re: Groovy syntax question
Date Sat, 02 Jul 2016 08:26:24 GMT
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


Mime
View raw message