docs.gradle.org

Methods  Modifier and Type Method and Description Task configure(Closure configureClosure)

Applies the statements of the closure against this task object.

Task deleteAllActions()

Removes all the actions of this task.

Task dependsOn(Object... paths)

Adds the given dependencies to this task.

boolean dependsOnTaskDidWork()

Checks if any of the tasks that this task depends on didWork.

Task doFirst(Action<? super Task> action)

Adds the given Action to the beginning of this task's action list.

Task doFirst(Closure action)

Adds the given closure to the beginning of this task's action list.

Task doLast(Action<? super Task> action)

Adds the given Action to the end of this task's action list.

Task doLast(Closure action)

Adds the given closure to the end of this task's action list.

Task finalizedBy(Object... paths)

Adds the given finalizer tasks for this task.

List<Action<? super Task>> getActions()

Returns the sequence of Action objects which will be executed by this task, in the order of execution.

AntBuilder getAnt()

Returns the AntBuilder for this task.

Convention getConvention()

Returns the Convention object for this task.

Set<Object> getDependsOn()

Returns the dependencies of this task.

String getDescription()

Returns the description of this task.

boolean getDidWork()

Checks if the task actually did any work.

boolean getEnabled()

Returns if this task is enabled or not.

TaskDependency getFinalizedBy()

Returns tasks that finalize this task.

String getGroup()

Returns the task group which this task belongs to.

TaskInputs getInputs()

Returns the inputs of this task.

Logger getLogger()

Returns the logger for this task.

LoggingManager getLogging()

Returns the LoggingManager which can be used to control the logging level and standard output/error capture for this task.

TaskDependency getMustRunAfter()

Returns tasks that this task must run after.

String getName()

Returns the name of this task.

TaskOutputs getOutputs()

Returns the outputs of this task.

String getPath()

Returns the path of the task, which is a fully qualified name for the task.

Project getProject()

Returns the Project which this task belongs to.

TaskDependency getShouldRunAfter()

Returns tasks that this task should run after.

TaskState getState()

Returns the execution state of this task.

TaskDependency getTaskDependencies()

Returns a TaskDependency which contains all the tasks that this task depends on.

File getTemporaryDir()

Returns a directory which this task can use to write temporary files to.

boolean hasProperty(String propertyName)

Determines if this task has the given property.

Task leftShift(Closure action)

Deprecated.

Task mustRunAfter(Object... paths)

Specifies that this task must run after all of the supplied tasks.

void onlyIf(Closure onlyIfClosure)

Execute the task only if the given closure returns true.

void onlyIf(Spec<? super Task> onlyIfSpec)

Execute the task only if the given spec is satisfied.

Object property(String propertyName)

Returns the value of the given property of this task.

void setActions(List<Action<? super Task>> actions)

Sets the sequence of Action objects which will be executed by this task.

void setDependsOn(Iterable<?> dependsOnTasks)

Sets the dependencies of this task.

void setDescription(String description)

Sets a description for this task.

void setDidWork(boolean didWork)

Sets whether the task actually did any work.

void setEnabled(boolean enabled)

Set the enabled state of a task.

void setFinalizedBy(Iterable<?> finalizedBy)

Specifies the set of finalizer tasks for this task.

void setGroup(String group)

Sets the task group which this task belongs to.

void setMustRunAfter(Iterable<?> mustRunAfter)

Specifies the set of tasks that this task must run after.

void setOnlyIf(Closure onlyIfClosure)

Execute the task only if the given closure returns true.

void setOnlyIf(Spec<? super Task> onlyIfSpec)

Execute the task only if the given spec is satisfied.

void setProperty(String name, Object value)

Sets a property of this task.

void setShouldRunAfter(Iterable<?> shouldRunAfter)

Specifies the set of tasks that this task should run after.

TaskDependency shouldRunAfter(Object... paths)

Specifies that this task should run after all of the supplied tasks.

Read the original on docs.gradle.org ↗