From the course: Learning Gradle

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Build lifecycle phases

Build lifecycle phases

From the course: Learning Gradle

Start my 1-month free trial

Build lifecycle phases

- Gradle builds a complete directed acyclic graph before any task is executed. Your build script is responsible for defining those tasks and their dependencies. Whenever a build is invoked by running the Gradle executable, the runtime will evaluate the instructions of the build script, create and configure the tasks and finally execute them in the correct order. Gradle executes this process in three distinct phases, the initialization phase, the configuration phase and the execution phase. Knowing the implications of those phases is extremely important for understanding what part of the build script is evaluated and when. Let's discuss each phase one by one. The initialization phase evaluates the settings that Gradle file. This file contains the information about the projects that should participate in the build. A settings file can exist for a single and multi project builds. You will find the file more…

Contents