As said in the Gradle documentation, section 6.4:
Gradle's build scripts give you the full power of Groovy.
I come across the following command:
apply plugin: 'java'
I tried to googling to encquire what it means at the Groovy point of view, but I have no idea. Is there a Groovy equivalent at all?
What you see is a syntactic sugar provided by Groovy for a method call. [No braces in method calls & implicit map coercion]
apply plugin: 'java' is same as apply([plugin: 'java'])
apply() is available in Gradle's Project API and project instance is available in Gradle build script by default. (In Groovy terms, operations in build.gradle is delegated to project)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With