Slackbot
09/01/2022, 8:06 PMephemient
09/01/2022, 8:14 PMtasks.named("quickAssembleOfMostCode") {
shouldRunAfter("someFormattingTask")
shouldRunBefore("build")
}
Zak Taccardi
09/01/2022, 8:16 PMString
then it doesn’t care until after evaluationZak Taccardi
09/01/2022, 8:26 PM/**
* Runs task1 and any of its dependencies before task 2 (shouldRunBefore)
* when there are free parallel executors.
*
* Task2 before Task3, etc
*/
priortize(
"task1",
"task2",
"task3",
"task4"
)
Zak Taccardi
09/01/2022, 8:53 PMVampire
09/01/2022, 9:28 PMshouldRunAfter("plainStringHere")
,
usually you should know which plugin adds the task in question and then you just react to that plugin being applied using pluginManager.withPlugin("...") { ... }
Vampire
09/01/2022, 9:31 PMtasks.withType<TheTaskType>().matching { it.name == "yourTaskName" }
for the price of all tasks with that type getting realized to check the name attribute whether they will be run or not. Because of that you should avoid doing tasks.matching { ... }
as that would realize each and every task.