interface TaskOutputs : CompatibilityAdapterForTaskOutputs
A TaskOutputs
represents the outputs of a task.
You can obtain a TaskOutputs
instance using org.gradle.api.Task#getOutputs()
.
abstract fun cacheIf(spec: Spec<in Task>): Unit
Cache the results of the task only if the given spec is satisfied. If the spec is not satisfied, the results of the task will not be cached. You may add multiple such predicates. The results of the task are not cached if any of the predicates return Consider using abstract fun cacheIf(cachingEnabledReason: String, spec: Spec<in Task>): Unit
Cache the results of the task only if the given spec is satisfied. If the spec is not satisfied, the results of the task will not be cached. You may add multiple such predicates. The results of the task are not cached if any of the predicates return |
|
abstract fun dir(path: Any): TaskOutputFilePropertyBuilder
Registers an output directory for this task. |
|
abstract fun dirs(vararg paths: Any): TaskOutputFilePropertyBuilder
Registers some output directories for this task. When the given Otherwise the given directories will be evaluated as per |
|
abstract fun doNotCacheIf(cachingDisabledReason: String, spec: Spec<in Task>): Unit
Disable caching the results of the task if the given spec is satisfied. The spec will be evaluated at task execution time, not during configuration. As opposed to You may add multiple such predicates. The results of the task are not cached if any of the predicates return |
|
abstract fun file(path: Any): TaskOutputFilePropertyBuilder
Registers some output file for this task. |
|
abstract fun files(vararg paths: Any): TaskOutputFilePropertyBuilder
Registers some output files for this task. When the given Otherwise the given files will be evaluated as per |
|
abstract fun getFiles(): FileCollection
Returns the output files of this task. |
|
abstract fun getHasOutput(): Boolean
Returns true if this task has declared any outputs. Note that a task may be able to produce output files and still have an empty set of output files. |
|
abstract fun upToDateWhen(upToDateClosure: Closure<Any>): Unit
Adds a predicate to determine whether the outputs of this task are up-to-date. The given closure is executed at task execution time. The closure is passed the task as a parameter. If the closure returns false, the task outputs are considered out-of-date and the task will be executed. You can add multiple such predicates. The task outputs are considered out-of-date when any predicate returns false. abstract fun upToDateWhen(upToDateSpec: Spec<in Task>): Unit
Adds a predicate to determine whether the outputs of this task are up-to-date. The given spec is evaluated at task execution time. If the spec returns false, the task outputs are considered out-of-date and the task will be executed. You can add multiple such predicates. The task outputs are considered out-of-date when any predicate returns false. |
interface TaskOutputFilePropertyBuilder : TaskFilePropertyBuilder, TaskOutputs
Describes an output property of a task that contains zero or more files. |