It is long time ago and I can’t fully remember. I think this is what it is about:
Keyword style is:
‘task jar(type: Jar) { … }’
This syntax is not legal Groovy syntax. To make it work we are using AST transforms.
Alternatively you can use an API style that is legal Groovy and does not require AST transforms:
‘tasks.create(name: ‘jar’, type: Jar) { … }’
I can’t come up with an example right now, but there have been programmatic constructs within an build script where you could not use the keyword style and had to use the API style.
BTW: Keyword style and API style is not an established terminology.