# exec

abstract fun exec(@DelegatesTo(value = ExecSpec::class) closure: Closure): ExecResult(source)

### Deprecated

Executes an external command. The closure configures a org.gradle.process.ExecSpec.

#### Return

the result of the execution

#### Deprecated

Since 8.11. This method will be removed in Gradle 9.0. Use exec or exec instead.

#### Parameters

closure

The closure for configuring the execution.

abstract fun exec(action: Action<in ExecSpec>): ExecResult(source)

### Deprecated

Executes an external command.

#### Return

the result of the execution

#### Deprecated

Since 8.11. This method will be removed in Gradle 9.0. Use exec or exec instead.

#### Parameters

action

The action for configuring the execution.