I am new to Gradle and Groovy and trying to understand what happens at the Groovy level when a Gradle task is given.
task hello { println "configuring task hello" doLast { println "hello there" } }
From reading the book "Gradle In Action", I know that task hello {} is really a call to the task() method of the Groovy Project interface. On page 77 shows that in the Project interface
There are 4 methods called task
task(args: Map<String,?>, name:String) task(args: Map<String,?>, name:String, c:Closure) task(name: String) task(name: String, c:Closure)
I understand that {} is a closure body.
I donβt understand how Groovy interprets hello in task hello { } in accordance with https://stackoverflow.com/a/166609/ ... there is a plugin for the Groovy compiler that converts task hello { } to task('hello', { })
My questions:
Where can I find information about the Gradle Groovy compiler plugin that does the conversion?
Is the claim that Grodle Groovy scripts are technically wrong because Gradle extends Groovy programming language in some way?
Is there a way to get the gradle command gradle print the Groovy base code that is generated after the compiler plugin starts?
groovy gradle
ams Dec 20 '14 at 21:23 2014-12-20 21:23
source share