Package org.gradle.api.tasks
Interface TaskInputFilePropertyBuilder
- All Superinterfaces:
TaskFilePropertyBuilder
,TaskPropertyBuilder
Describes an input property of a task that contains zero or more files.
- Since:
- 3.0
-
Method Summary
Modifier and TypeMethodDescriptionIgnore directories during up-to-date checks and build cache key calculations.ignoreEmptyDirectories
(boolean ignoreEmptyDirectories) Sets whether directories should be considered during up-to-date checks and build cache key calculations.Normalize line endings in text files during up-to-date checks and build cache key calculations.normalizeLineEndings
(boolean normalizeLineEndings) Sets whether line endings should be normalized during up-to-date checks and build cache key calculations.optional()
Marks a task property as optional.optional
(boolean optional) Sets whether the task property is optional.Skip executing the task if the property contains no files.skipWhenEmpty
(boolean skipWhenEmpty) Sets whether executing the task should be skipped if the property contains no files.withNormalizer
(Class<? extends FileNormalizer> normalizer) Sets the normalizer to use for this property.withPathSensitivity
(PathSensitivity sensitivity) Sets which part of the path of files should be considered during up-to-date checks and build cache key calculations.withPropertyName
(String propertyName) Sets the name for this property.
-
Method Details
-
withPropertyName
Sets the name for this property. The name must be a non-empty string.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
-
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
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
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
Sets which part of the path of files should be considered during up-to-date checks and build cache key calculations.- Since:
- 3.1
-
withNormalizer
Sets the normalizer to use for this property.- Since:
- 4.3
-
ignoreEmptyDirectories
TaskInputFilePropertyBuilder ignoreEmptyDirectories()Ignore directories during up-to-date checks and build cache key calculations. When this is set, only the contents of directories will be considered, but not the directories themselves. Changes to empty directories, and directories that contain only empty directories, will be ignored.- Since:
- 6.8
-
ignoreEmptyDirectories
Sets whether directories should be considered during up-to-date checks and build cache key calculations. Defaults to false. SeeignoreEmptyDirectories()
.- Since:
- 6.8
-
normalizeLineEndings
TaskInputFilePropertyBuilder normalizeLineEndings()Normalize line endings in text files during up-to-date checks and build cache key calculations. This setting will have no effect on binary files.Line ending normalization is only supported with ASCII encoding and its supersets (i.e. UTF-8, ISO-8859-1, etc). Other encodings (e.g. UTF-16) will be treated as binary files and will not be subject to line ending normalization.
- Since:
- 7.2
-
normalizeLineEndings
Sets whether line endings should be normalized during up-to-date checks and build cache key calculations. Defaults to false. SeenormalizeLineEndings()
.- Parameters:
normalizeLineEndings
- whether line endings should be normalized- Since:
- 7.2
-