groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thibault Kruse <tibokr...@googlemail.com>
Subject Re: Groovy syntax question
Date Tue, 05 Jul 2016 08:03:05 GMT
I have no advice beyond what can be found via google.

On Sun, Jul 3, 2016 at 8:56 AM, Roman Shaposhnik <roman@shaposhnik.org> wrote:
> Thibault, Jochen,
>
> thank you guys -- you got me going (turns out my confusion was partially
> because newly defined tasks are also visible as a property).
>
> One final question -- do you have any recommendation on how to
> debug (well, trace actually) Groovy scripts inside of Gradle build.gradle?
>
> Seems like my go-to IDE InteliJ is broken in that regard. Any suggestions
> on what may work?
>
> Thanks,
> Roman.
>
> On Sat, Jul 2, 2016 at 1:26 AM, Jochen Theodorou <blackdrag@gmx.org> wrote:
>> 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