Package org.gradle.api.tasks
Interface TaskOutputFilePropertyBuilder
- All Superinterfaces:
CompatibilityAdapterForTaskOutputs
,TaskFilePropertyBuilder
,TaskOutputs
,TaskPropertyBuilder
@Incubating
public interface TaskOutputFilePropertyBuilder
extends TaskFilePropertyBuilder, TaskOutputs
Describes an output property of a task that contains zero or more files.
- Since:
- 3.0
-
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Deprecated.UseTaskOutputs.file(Object)
instead.Deprecated.UseTaskOutputs.files(Object...)
instead.getFiles()
Deprecated.UseTaskOutputs.getFiles()
instead.boolean
Deprecated.UseTaskOutputs.getHasOutput()
instead.optional()
Marks a task property as optional.optional
(boolean optional) Sets whether the task property is optional.void
upToDateWhen
(Closure upToDateClosure) Deprecated.UseTaskOutputs.upToDateWhen(Closure)
instead.void
upToDateWhen
(Spec<? super Task> upToDateSpec) Deprecated.UseTaskOutputs.upToDateWhen(Spec)
instead.withPropertyName
(String propertyName) Sets the name for this property.Methods inherited from interface org.gradle.api.tasks.TaskOutputs
cacheIf, cacheIf, dirs, doNotCacheIf
-
Method Details
-
withPropertyName
Sets the name for this property. The name must be a valid Java identifier, or a series of valid Java identifiers separated with dots ('.').If the method is not called, or if it is called with
null
, a name will be assigned to the property automatically.- Specified by:
withPropertyName
in interfaceTaskFilePropertyBuilder
-
optional
TaskOutputFilePropertyBuilder optional()Marks a task property as optional. This means that a value does not have to be specified for the property, but any value specified must meet the validation constraints for the property. -
optional
Sets whether the task property is optional. If the task property is optional, it means that a value does not have to be specified for the property, but any value specified must meet the validation constraints for the property. -
upToDateWhen
Deprecated.UseTaskOutputs.upToDateWhen(Closure)
instead.ThrowsUnsupportedOperationException
.- Specified by:
upToDateWhen
in interfaceTaskOutputs
- Parameters:
upToDateClosure
- The closure to use to determine whether the task outputs are up-to-date.
-
upToDateWhen
Deprecated.UseTaskOutputs.upToDateWhen(Spec)
instead.ThrowsUnsupportedOperationException
.- Specified by:
upToDateWhen
in interfaceTaskOutputs
- Parameters:
upToDateSpec
- The spec to use to determine whether the task outputs are up-to-date.
-
getHasOutput
Deprecated.UseTaskOutputs.getHasOutput()
instead.ThrowsUnsupportedOperationException
.- Specified by:
getHasOutput
in interfaceTaskOutputs
- Returns:
- true if this task has declared any outputs, otherwise false.
-
getFiles
Deprecated.UseTaskOutputs.getFiles()
instead.ThrowsUnsupportedOperationException
.- Specified by:
getFiles
in interfaceTaskOutputs
- Returns:
- The output files. Returns an empty collection if this task has no output files.
-
files
Deprecated.UseTaskOutputs.files(Object...)
instead.ThrowsUnsupportedOperationException
.- Specified by:
files
in interfaceCompatibilityAdapterForTaskOutputs
- Specified by:
files
in interfaceTaskOutputs
- Parameters:
paths
- The output files.- Returns:
- this
- See Also:
-
file
Deprecated.UseTaskOutputs.file(Object)
instead.ThrowsUnsupportedOperationException
.- Specified by:
file
in interfaceCompatibilityAdapterForTaskOutputs
- Specified by:
file
in interfaceTaskOutputs
- Parameters:
path
- The output file. The given path is evaluated as perProject.file(Object)
.- Returns:
- a property builder to further configure this property.
-
dir
Deprecated.UseTaskOutputs.dir(Object)
instead.ThrowsUnsupportedOperationException
.- Specified by:
dir
in interfaceCompatibilityAdapterForTaskOutputs
- Specified by:
dir
in interfaceTaskOutputs
- Parameters:
path
- The output directory. The given path is evaluated as perProject.file(Object)
.- Returns:
- a property builder to further configure this property.
-
TaskOutputs.dir(Object)
instead.