Vocabulary
satya - 7/16/2018, 3:32:44 PM
What are gradle conventions?
What are gradle conventions?
satya - 7/16/2018, 3:34:06 PM
Conventions
When a build takes place, the tasks or the plugins that accomplish the build assume a certain default directory structure, names, values etc.
These are called conventions.
One can override these values through task objects or through more global objects such as a "project" or "gradle" etc.
satya - 7/17/2018, 10:25:21 AM
Delegated
Gradle is an Object oriented paradigm
Projects and tasks are objects
Objects behavior is constrained by its properties
A gradle file alters the properties of these objects via method calls
The script in the gradle file is a block of groovy code
The groovy code executes in the context of a parent object (like a closure) which is implied
This contexted object is called a delegate
So this delegated object/class provides the methods and properties to be manipulated by the groovy code block (called closure)
satya - 3/14/2019, 1:26:23 PM
That means...
A parent object on which a closure seem to execute, may change the context of the closure there by that method executes on a different object. One can know this, I suppose by looking at the JDK api for that method on that parent object and see who is the context object for it.