As Groovy is an object-oriented language based on Java, its properties and methods apply to objects. In some cases, the object is implicit ? particularly at the top level of a build script, i.e. not nested inside a
{}
block.
Consider this fragment of build script, which contains an unqualified property and block:
version = '1.0.0.GA'
configurations {
...
}
This example reflects how every Groovy build script is backed by an implicit instance of
Project
. If you see an unqualified element and you don’t know where it’s defined, always check the
Project
API documentation to see if that’s where it’s coming from.
|
Use of Groovy-specific metaprogramming can cause builds to retain large amounts of memory between builds that will eventually cause the Gradle daemon to run out-of-memory.
|