api / org.gradle.api / Task / getState

getState

@Internal abstract fun getState(): TaskState

Returns the execution state of this task. This provides information about the execution of this task, such as whether it has executed, been skipped, has failed, etc.

Return
The execution state of this task. Never returns null.