Continuing the discussion from [What is the status and future of parallel task execution?]

I finally decided to create a simple plugin to allow execution of gradle tasks concurrently within the same module. If its any help, the project is located on github. The main use case driving the creation of this plugin was to allow me to execute multiple app servers (each defined by its own gradle task) to assist with development. I’m not comfortable with the idea of using it for production, but would be interested in discussing it. I might submit it back to gradle if anyone thinks its useful.

Continuing the discussion from What is the status and future of parallel task execution?:

Continuing the discussion from What is the status and future of parallel task execution?:

Continuing the discussion from What is the status and future of parallel task execution?:

Continuing the discussion from What is the status and future of parallel task execution?:

There is actually support for running multiple tasks in the same project in parallel but it’s not currently publicly documented. You can enable the feature by setting a system property -Dorg.gradle.parallel.intra=true. This is still incubating and it can be very easy to do naughty things in your task implementations which is why it isn’t yet public. Take a look at the JavaDoc for @ParallelizableTask for more information.

https://github.com/gradle/gradle/blob/master/subprojects/core/src/main/groovy/org/gradle/api/tasks/ParallelizableTask.java

1 Like

Thanks Mark for that info.

Those of us coming from a GNU Makefile background should be very much aware that shared data should not be modified. For example, when GNU Make targets are executed in parallel, we already know we cannot write to a fixed-name temporary file, we explicitly use mktemp to avoid those collisions.

Will I be able to run tasks of Exec type in parallel, so I can call my external compilers?

By default, no, since Exec isn’t annotated with @ParallelizableTask. You could, however, extend Exec and add the annotation to get that behavior.

Is --parallel switch still incubating? At least the doc doesn’t mention that.