Slackbot
09/01/2022, 8:53 PMVampire
09/01/2022, 9:32 PMmatching
way for the same price as described in the other thread.Zak Taccardi
09/01/2022, 9:41 PMephemient
09/01/2022, 9:53 PMval order = listOf("task1", "task2", "task3", "task4")
tasks.configureEach {
val index = order.indexOf(name)
if (index >= 0) {
shouldRunAfter(order.take(index))
}
}
this shouldn't configure more tasks than would otherwise be configuredVampire
09/01/2022, 9:54 PMmatching
is not necessary of course. I tend to forget that 😞Zak Taccardi
09/01/2022, 9:56 PMassembleDebug
on all subprojectsephemient
09/01/2022, 9:58 PMVampire
09/01/2022, 9:59 PMZak Taccardi
09/01/2022, 10:01 PMtrying to do so across different projects sounds pretty fishydoes the use case make sense? currently we have CI run multiple separate Gradle CLI commands.
./gradlew task1 // would be a formatting check, so important to run first for quick feedback
./gradlew task2
./gradlew task3
./gradlew task4
I want to move this to the following for things like a single build scan and better use of parallelization:
./gradlew task1 task2 task3 task4
but preserve the ordering benefits of the separate CLI commands for quick feedback orderZak Taccardi
09/01/2022, 10:02 PMshouldRunAfter
)Vampire
09/01/2022, 10:08 PM--parallel
or --configuration-cache
is used of course, then it is more complex)Zak Taccardi
09/01/2022, 10:08 PMthey should be run from left to rightis this documented anywhere?
Vampire
09/01/2022, 10:09 PMZak Taccardi
09/01/2022, 10:11 PMVampire
09/01/2022, 10:13 PMVampire
09/01/2022, 10:14 PMVampire
09/01/2022, 10:14 PMZak Taccardi
09/01/2022, 10:15 PMa task further right without dependencies might be executed earlier than a task further leftthis is actually fine and ideal. I would just want that whenever there is a free executor/worker to pick up a left-weighted task dependency before a right weighted task
Vampire
09/01/2022, 10:16 PMVampire
09/01/2022, 10:17 PMZak Taccardi
09/01/2022, 10:17 PMZak Taccardi
09/01/2022, 10:17 PMZak Taccardi
09/01/2022, 10:21 PM./gradlew formatting
./gradlew assembleDebug
./gradlew build // everything else
There’s a lot of time wasted in the above by unused executors, extra configuration time, and it also creates separate build scans for the same job.
so I prefer:
./gradlew formatting assembleDebug build
and if there is a free executor, I want Gradle to pick up a task dependency that is most left-weighted as possibleZak Taccardi
09/01/2022, 10:22 PMZak Taccardi
09/01/2022, 10:23 PMassembleDebug
is running and there’s some free executors, I’d want Gradle to start executing a task dependency from build
Zak Taccardi
09/01/2022, 10:23 PM