interface TaskState
TaskState
provides information about the execution state of a org.gradle.api.Task. You can obtain a TaskState
instance by calling org.gradle.api.Task#getState()
.
abstract fun getDidWork(): Boolean
Checks if the task actually did any work. Even if a task executes, it may determine that it has nothing to do. For example, a compilation task may determine that source files have not changed since the last time a the task was run. |
|
abstract fun getExecuted(): Boolean
Returns true if this task has been executed. |
|
abstract fun getFailure(): Throwable
Returns the exception describing the task failure, if any. |
|
abstract fun getNoSource(): Boolean
Returns true if the execution of this task was skipped due to task inputs are empty. |
|
abstract fun getSkipMessage(): String
Returns a message describing why the task was skipped. |
|
abstract fun getSkipped(): Boolean
Returns true if the execution of this task was skipped for some reason. |
|
abstract fun getUpToDate(): Boolean
Returns true if the execution of this task was skipped because the task was up-to-date. |
|
abstract fun rethrowFailure(): Unit
Throws the task failure, if any. Does nothing if the task did not fail. |