TaskState

interface TaskState(source)

TaskState provides information about the execution state of a org.gradle.api.Task.

You can obtain a TaskState instance by calling getState.

Accessing the details of the task state is only meaningful after the task has been executed.

Functions

Link copied to clipboard
abstract fun getDidWork(): Boolean
Checks if the task actually did any work.
Link copied to clipboard
abstract fun getExecuted(): Boolean
Returns true if this task has been executed.
Link copied to clipboard
@Nullable
abstract fun getFailure(): Throwable
Returns the exception describing the task failure, if any.
Link copied to clipboard
abstract fun getNoSource(): Boolean
Returns true if the execution of this task was skipped due to task inputs are empty.
Link copied to clipboard
@Nullable
abstract fun getSkipMessage(): String
Returns a message describing why the task was skipped.
Link copied to clipboard
abstract fun getSkipped(): Boolean
Returns true if the execution of this task was skipped for some reason.
Link copied to clipboard
abstract fun getUpToDate(): Boolean
Returns true if the execution of this task was skipped because the task was up-to-date.
Link copied to clipboard
abstract fun rethrowFailure()
Throws the task failure, if any.