Vocabulary

What are gradle conventions?

Search for: What are gradle 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.

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)

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.