Package org.gradle.api.tasks
Interface TaskInputFilePropertyBuilder
-
- All Superinterfaces:
CompatibilityAdapterForTaskInputs,TaskFilePropertyBuilder,TaskInputs,TaskPropertyBuilder
@Incubating public interface TaskInputFilePropertyBuilder extends TaskFilePropertyBuilder, TaskInputs
Describes an input property of a task that contains zero or more files.- Since:
- 3.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description TaskInputFilePropertyBuilderdir(Object dirPath)Deprecated.UseTaskInputs.dir(Object)directly instead.TaskInputFilePropertyBuilderfile(Object path)Deprecated.UseTaskInputs.file(Object)directly instead.TaskInputFilePropertyBuilderfiles(Object... paths)Deprecated.UseTaskInputs.files(Object...)directly instead.FileCollectiongetFiles()Deprecated.UseTaskInputs.getFiles()directly instead.booleangetHasInputs()Deprecated.UseTaskInputs.getHasInputs()directly instead.booleangetHasSourceFiles()Deprecated.UseTaskInputs.getHasSourceFiles()directly instead.Map<String,Object>getProperties()Deprecated.UseTaskInputs.getProperties()directly instead.FileCollectiongetSourceFiles()Deprecated.UseTaskInputs.getSourceFiles()directly instead.TaskInputFilePropertyBuilderoptional()Marks a task property as optional.TaskInputFilePropertyBuilderoptional(boolean optional)Sets whether the task property is optional.TaskInputsproperties(Map<String,?> properties)Deprecated.UseTaskInputs.properties(Map)directly instead.TaskInputPropertyBuilderproperty(String name, Object value)Deprecated.UseTaskInputs.property(String, Object)directly instead.TaskInputFilePropertyBuilderskipWhenEmpty()Skip executing the task if the property contains no files.TaskInputFilePropertyBuilderskipWhenEmpty(boolean skipWhenEmpty)Sets whether executing the task should be skipped if the property contains no files.TaskInputFilePropertyBuilderwithNormalizer(Class<? extends FileNormalizer> normalizer)Sets the normalizer to use for this property.TaskInputFilePropertyBuilderwithPathSensitivity(PathSensitivity sensitivity)Sets which part of the path of files should be considered during up-to-date checks.TaskInputFilePropertyBuilderwithPropertyName(String propertyName)Sets the name for this property.
-
-
-
Method Detail
-
withPropertyName
TaskInputFilePropertyBuilder withPropertyName(String propertyName)
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:
withPropertyNamein interfaceTaskFilePropertyBuilder
-
skipWhenEmpty
TaskInputFilePropertyBuilder skipWhenEmpty()
Skip executing the task if the property contains no files. If there are multiple properties with {code skipWhenEmpty = true}, then they all need to be empty for the task to be skipped.
-
skipWhenEmpty
TaskInputFilePropertyBuilder skipWhenEmpty(boolean skipWhenEmpty)
Sets whether executing the task should be skipped if the property contains no files. If there are multiple properties with {code skipWhenEmpty = true}, then they all need to be empty for the task to be skipped.
-
optional
TaskInputFilePropertyBuilder 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
TaskInputFilePropertyBuilder optional(boolean 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.
-
withPathSensitivity
TaskInputFilePropertyBuilder withPathSensitivity(PathSensitivity sensitivity)
Sets which part of the path of files should be considered during up-to-date checks.- Since:
- 3.1
-
withNormalizer
TaskInputFilePropertyBuilder withNormalizer(Class<? extends FileNormalizer> normalizer)
Sets the normalizer to use for this property.- Since:
- 4.3
-
getHasInputs
@Deprecated boolean getHasInputs()
Deprecated.UseTaskInputs.getHasInputs()directly instead.ThrowsUnsupportedOperationException.- Specified by:
getHasInputsin interfaceTaskInputs- Returns:
- true if this task has declared any inputs.
-
getFiles
@Deprecated FileCollection getFiles()
Deprecated.UseTaskInputs.getFiles()directly instead.ThrowsUnsupportedOperationException.- Specified by:
getFilesin interfaceTaskInputs- Returns:
- The input files. Returns an empty collection if this task has no input files.
-
files
@Deprecated TaskInputFilePropertyBuilder files(Object... paths)
Deprecated.UseTaskInputs.files(Object...)directly instead.ThrowsUnsupportedOperationException.- Specified by:
filesin interfaceCompatibilityAdapterForTaskInputs- Specified by:
filesin interfaceTaskInputs- Parameters:
paths- The input files. The given paths are evaluated as perProject.files(Object...).- Returns:
- a property builder to further configure the property.
-
file
@Deprecated TaskInputFilePropertyBuilder file(Object path)
Deprecated.UseTaskInputs.file(Object)directly instead.ThrowsUnsupportedOperationException.- Specified by:
filein interfaceCompatibilityAdapterForTaskInputs- Specified by:
filein interfaceTaskInputs- Parameters:
path- The input file. The given path is evaluated as perProject.file(Object).- Returns:
- a property builder to further configure the property.
-
dir
@Deprecated TaskInputFilePropertyBuilder dir(Object dirPath)
Deprecated.UseTaskInputs.dir(Object)directly instead.ThrowsUnsupportedOperationException.- Specified by:
dirin interfaceCompatibilityAdapterForTaskInputs- Specified by:
dirin interfaceTaskInputs- Parameters:
dirPath- The directory. The path is evaluated as perProject.file(Object).- Returns:
- a property builder to further configure the property.
-
getProperties
@Deprecated Map<String,Object> getProperties()
Deprecated.UseTaskInputs.getProperties()directly instead.ThrowsUnsupportedOperationException.- Specified by:
getPropertiesin interfaceTaskInputs- Returns:
- The properties.
-
property
@Deprecated TaskInputPropertyBuilder property(String name, @Nullable Object value)
Deprecated.UseTaskInputs.property(String, Object)directly instead.ThrowsUnsupportedOperationException.- Specified by:
propertyin interfaceCompatibilityAdapterForTaskInputs- Specified by:
propertyin interfaceTaskInputs- Parameters:
name- The name of the property. Must not be null.value- The value for the property. Can be null.
-
properties
@Deprecated TaskInputs properties(Map<String,?> properties)
Deprecated.UseTaskInputs.properties(Map)directly instead.ThrowsUnsupportedOperationException.- Specified by:
propertiesin interfaceTaskInputs- Parameters:
properties- The properties.
-
getHasSourceFiles
@Deprecated boolean getHasSourceFiles()
Deprecated.UseTaskInputs.getHasSourceFiles()directly instead.ThrowsUnsupportedOperationException.- Specified by:
getHasSourceFilesin interfaceTaskInputs- Returns:
- true if this task has source files, false if not.
-
getSourceFiles
@Deprecated FileCollection getSourceFiles()
Deprecated.UseTaskInputs.getSourceFiles()directly instead.ThrowsUnsupportedOperationException.- Specified by:
getSourceFilesin interfaceTaskInputs- Returns:
- The set of source files for this task.
-
-