From the course: Learning Gradle

Unlock the full course today

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

The directed acyclic graph (DAG)

The directed acyclic graph (DAG)

From the course: Learning Gradle

Start my 1-month free trial

The directed acyclic graph (DAG)

- [Instructor] In the last video, you learned about task dependencies. Tasks are not limited to a single dependency. In fact, you can declare as many as you want. This is an important piece of information you will need to know though. The execution order of task dependencies is non-deterministic. Say you have a task A that depends on B and C. At runtime, B could be executed first or C could be executed first. Oftentimes, the execution order of task dependencies doesn't really matter as long as it does happen. But under certain conditions, you will want to enforce correct ordering. To do so, declare A depends on from B to C or vice versa. There are other methods available to the Task API that influences task execution order. More specifically, must run after, should run after and finalized by. For a deeper exposure, refer to the Gradle user guide. At runtime, Gradle builds a so-called directed acyclic graph for tasks…

Contents