Classes for running external processes.

ExecHandle

The {@link org.gradle.util.exec.ExecHandle} is the class that maps to the external process and provides control methods to start/abort or wait for the external process to terminate (normally or by a failure).

ExecHandleBuilder

Creating an instance of {@link org.gradle.util.exec.ExecHandle} is done using the {@link org.gradle.util.exec.ExecHandleBuilder} that provides a bunch of usefull functions to set the arguments/... .

ExecHandleListener

It is also possible to add listeners {@link org.gradle.util.exec.ExecHandleListener} to the {@link org.gradle.util.exec.ExecHandle} that are called when the {@link org.gradle.util.exec.ExecHandle} changes from state {@link org.gradle.util.exec.ExecHandleState}.

ExecOutputHandle

In order to prevent the external process from blocking (because the output buffers are full) the standard output and error output are fetch continuously by two Threads until the process terminates. These Threads pass the output to an {@link org.gradle.util.exec.ExecOutputHandle}. The default behaviour is to pass all the output to the standard output and error output of the parent process. By passing in other {@link org.gradle.util.exec.ExecOutputHandle} this behaviour can be customized.