gradle
8.5

# addProgressListener

abstract fun addProgressListener(listener: ProgressListener): LongRunningOperation(source)

Adds a progress listener which will receive progress events as the operation runs.

This method is intended to be replaced by addProgressListener. The new progress listener type provides much richer information and much better handling of parallel operations that run during the build, such as tasks that run in parallel. You should prefer using the new listener interface where possible. Note, however, that the new interface is supported only for Gradle 2.5.

#### Return

this

#### Parameters

listener

The listener

abstract fun addProgressListener(listener: ProgressListener): LongRunningOperation(source)

Adds a progress listener which will receive progress events of all types as the operation runs.

This method is intended to replace addProgressListener. You should prefer using the new progress listener method where possible, as the new interface provides much richer information and much better handling of parallel operations that run during the build.

Supported by Gradle 2.5 or later. Gradle 2.4 supports TEST operations only. Ignored for older versions.

#### Return

this

#### Parameters

listener

The listener

abstract fun addProgressListener(listener: ProgressListener, operationTypes: Set<OperationType>): LongRunningOperation(source)
abstract fun addProgressListener(listener: ProgressListener, operationTypes: Array<OperationType>): LongRunningOperation(source)

Adds a progress listener which will receive progress events as the operations of the requested type run.

This method is intended to replace addProgressListener. You should prefer using the new progress listener method where possible, as the new interface provides much richer information and much better handling of parallel operations that run during the build.

Supported by Gradle 2.5 or later. Gradle 2.4 supports TEST operations only. Ignored for older versions.

#### Return

this

#### Parameters

listener

The listener

operationTypes

The types of operations to receive progress events for.