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)
- [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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
Build files and conventions4m 29s
-
Defining and configuring a task5m 28s
-
The directed acyclic graph (DAG)2m 44s
-
Build lifecycle phases2m 41s
-
Applying reusable functionality with plugins3m 20s
-
Domain object runtime representation2m 44s
-
Referencing the documentation2m 30s
-
Challenge: Define and execute a task1m 29s
-
Solution: Define and execute a task7m 55s
-
-