Ori Popowski
Ori Popowski

Reputation: 10662

Why those two task definition syntaxes equivalent?

Can you explain why those two task definitions in Gradle are equivalent?

task(type: Copy, 'myTask')

And

task myTask(type: Copy)

Is it some Groovy magic syntax thingy that I'm not familiar with, or actually a Gradle preprocessing?

Upvotes: 1

Views: 48

Answers (1)

Javier92
Javier92

Reputation: 813

Gradle seems to use build script transformers, which are executed during the buildscript compilation phase.

Here's the transformer you're looking for.

Here is a list of transformations.

Upvotes: 1

Related Questions