Understand parallelism of Gradle task execution

Hello,

I try to understand parallelism of Gradle task execution:
e.g. In plugin I have three tasks A, B, C inherit from DefaultTask. Task C depends on A and B. Why when I run task C tasks A and B executed one by one and not in parallel, could you please advise?
Is it possible change executor behavior to execute independent tasks in parallel?

There are multiple things to this.

Best is you adopt configuration cache, because with configuration cache all tasks can run in parallel if they don’t have some ordering constraint / dependency, even within one project.

With the old --parallel (or its property setting) tasks from different projects can run in parallel.

Even without those two options, work-items of independent tasks that use the worker API could run in parallel.

Hi, thank you for answer!
Could you please explain in details about “adopt configuration cache”? What exactly should I do?
Could you point to example of using worker API?

Not even doing a minimal research on your own is one of the main characteristics of a help vampire. Have a look at the user guide it explains the configuration cache and it explains usage of the worker API. Feel free to ask if you have further problems, but just “explain it to me even if I could find it quickly” is not really nice and not a good utilization of my time. :wink: