gradle Ordering tasks

30% OFF - 9th Anniversary discount on Entity Framework Extensions until December 15 with code: ZZZANNIVERSARY9


Please note that mustRunAfter and shouldRunAfter are marked as "incubating" (as of Gradle 3.0) which means that these are experimental features and their behavior can be changed in future releases.

There are two ordering rules available:

  • mustRunAfter
  • shouldRunAfter

When you use the mustRunAfter ordering rule you specify that taskB must always run after taskA, whenever both taskA and taskB will be run.

The shouldRunAfter ordering rule is similar but less strict as it will be ignored in two situations:

  • if using that rule introduces an ordering cycle.
  • when using parallel execution and all dependencies of a task have been satisfied apart from the shouldRunAfter task, then this task will be run regardless of whether its shouldRunAfter dependencies have been run or not.

Got any gradle Question?