# exec

fun exec(configuration: ExecSpec.() -> Unit): ExecResult(source)

### Deprecated

This method will be removed in Gradle 9.0. Use ExecOperations.exec(Action) or ProviderFactory.exec(Action) instead.

Executes an external command.

This method blocks until the process terminates, with its result being returned.

#### Return

The result of the execution.

#### Parameters

configuration

The block to use to configure the ExecSpec.