gradle Ordering tasks

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Insert
> Step 2: And Like the video. BONUS: You can also share it!

Remarks

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?