gradle
8.2

# TaskState

interface TaskState

`TaskState` provides information about the execution state of a org.gradle.api.Task. You can obtain a `TaskState` instance by calling getState.

## Functions

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