Gradle Build Automation – Part 4

Understanding Gradle Processes.

How Gradle Executes Scripts

  1. Gradle reads the script file.
  2. Creates a Project Object and configure it (set up data).
  3. Finally set of tasks to be executed is determined and executed.

We can project object in Gradle script with the variable name project. We can set the project description like this,

setDescription(“My First Gradle Script”)   or    project.setDescription(“My First Gradle Script”)

Gradle tasks

Lets make it simple. Project ( has one or more tasks ), Task is made up of actions.

doFirst {

println ‘Running first’
}

Tagged: , , ,

Leave a comment