@Incubating public interface TaskOutputFilePropertyBuilder extends TaskFilePropertyBuilder, TaskOutputs
Modifier and Type | Method and Description |
---|---|
TaskOutputFilePropertyBuilder |
dir(Object path)
Deprecated.
Use
TaskOutputs.dir(Object) instead. |
TaskOutputFilePropertyBuilder |
file(Object path)
Deprecated.
Use
TaskOutputs.file(Object) instead. |
TaskOutputFilePropertyBuilder |
files(Object... paths)
Deprecated.
Use
TaskOutputs.files(Object...) instead. |
FileCollection |
getFiles()
Deprecated.
Use
TaskOutputs.getFiles() instead. |
boolean |
getHasOutput()
Deprecated.
Use
TaskOutputs.getHasOutput() instead. |
TaskOutputFilePropertyBuilder |
optional()
Marks a task property as optional.
|
TaskOutputFilePropertyBuilder |
optional(boolean optional)
Sets whether the task property is optional.
|
void |
upToDateWhen(Closure upToDateClosure)
Deprecated.
Use
TaskOutputs.upToDateWhen(Closure) instead. |
void |
upToDateWhen(Spec<? super Task> upToDateSpec)
Deprecated.
Use
TaskOutputs.upToDateWhen(Spec) instead. |
TaskOutputFilePropertyBuilder |
withPathSensitivity(PathSensitivity sensitivity)
Sets which part of the path of files should be considered during up-to-date checks.
|
TaskOutputFilePropertyBuilder |
withPropertyName(String propertyName)
Sets the name for this property.
|
cacheIf, cacheIf, dirs, doNotCacheIf, doNotCacheIf
TaskOutputFilePropertyBuilder withPropertyName(String propertyName)
If the method is not called, or if it is called with null
, a name
will be assigned to the property automatically.
withPropertyName
in interface TaskPropertyBuilder
TaskOutputFilePropertyBuilder optional()
TaskOutputFilePropertyBuilder optional(boolean optional)
TaskOutputFilePropertyBuilder withPathSensitivity(PathSensitivity sensitivity)
withPathSensitivity
in interface TaskFilePropertyBuilder
@Deprecated void upToDateWhen(Closure upToDateClosure)
TaskOutputs.upToDateWhen(Closure)
instead.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.
upToDateWhen
in interface TaskOutputs
upToDateClosure
- The closure to use to determine whether the task outputs are up-to-date.@Deprecated void upToDateWhen(Spec<? super Task> upToDateSpec)
TaskOutputs.upToDateWhen(Spec)
instead.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.
upToDateWhen
in interface TaskOutputs
upToDateSpec
- The spec to use to determine whether the task outputs are up-to-date.@Deprecated boolean getHasOutput()
TaskOutputs.getHasOutput()
instead.getHasOutput
in interface TaskOutputs
@Deprecated FileCollection getFiles()
TaskOutputs.getFiles()
instead.getFiles
in interface TaskOutputs
@Deprecated TaskOutputFilePropertyBuilder files(Object... paths)
TaskOutputs.files(Object...)
instead.When the given paths
is a Map
, then each output file
will be associated with an identity. For cacheable tasks this is a requirement.
The keys of the map should not be null
, and they must be
valid Java identifiers}.
The values of the map will be evaluated to individual files as per
Project.file(Object)
.
Otherwise the given files will be evaluated as per Project.files(Object...)
,
and task output caching will be disabled for the task.
files
in interface CompatibilityAdapterForTaskOutputs
files
in interface TaskOutputs
paths
- The output files.CacheableTask
@Deprecated TaskOutputFilePropertyBuilder file(Object path)
TaskOutputs.file(Object)
instead.file
in interface CompatibilityAdapterForTaskOutputs
file
in interface TaskOutputs
path
- The output file. The given path is evaluated as per Project.file(Object)
.@Deprecated TaskOutputFilePropertyBuilder dir(Object path)
TaskOutputs.dir(Object)
instead.dir
in interface CompatibilityAdapterForTaskOutputs
dir
in interface TaskOutputs
path
- The output directory. The given path is evaluated as per Project.file(Object)
.