Please note that
shouldRunAfterare 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:
When you use the
mustRunAfter ordering rule you specify that taskB must always run after taskA, whenever both taskA and taskB will be run.
shouldRunAfter ordering rule is similar but less strict as it will be ignored in two situations:
shouldRunAftertask, then this task will be run regardless of whether its
shouldRunAfterdependencies have been run or not.