1

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?

Ori Popowski
  • 10,432
  • 15
  • 57
  • 79

1 Answers1

1

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.

Javier92
  • 773
  • 6
  • 12