groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roman Shaposhnik <ro...@shaposhnik.org>
Subject Groovy syntax question
Date Sat, 02 Jul 2016 07:06:42 GMT
Hi!

while working with Gradle I've come across a behavior
that I find impossible to explain. Basically, how is it possible
for 'exec' in the first line to resolve and the one in println
line not to?

I'd really appreciate if somebody can explain what the first
exec resolves to and why:

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

println exec

$ gradle -q
foo

FAILURE: Build failed with an exception.

* Where:
Build file '/private/tmp/P/build.gradle' line: 5

* What went wrong:
A problem occurred evaluating root project 'P'.
> Could not find property 'exec' on root project 'P'.

Thanks,
Roman.

Mime
View raw message