Package org.gradle.api.file
Interface ConfigurableFileCollection
-
- All Superinterfaces:
AntBuilderAware
,Buildable
,FileCollection
,HasConfigurableValue
,java.lang.Iterable<java.io.File>
,SupportsConvention
@SupportsKotlinAssignmentOverloading public interface ConfigurableFileCollection extends FileCollection, HasConfigurableValue, SupportsConvention
A
ConfigurableFileCollection
is a mutableFileCollection
.You can obtain an instance of
ConfigurableFileCollection
by callingProject.files(Object...)
orObjectFactory.fileCollection()
.Note: This interface is not intended for implementation by build script or plugin authors.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.gradle.api.file.FileCollection
FileCollection.AntType
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ConfigurableFileCollection
builtBy(java.lang.Object... tasks)
Registers some tasks which build the files of this collection.ConfigurableFileCollection
convention(java.lang.Iterable<?> paths)
Specifies the value to use as the convention (default value) to be used when resolving this file collection, if no source paths are explicitly defined.ConfigurableFileCollection
convention(java.lang.Object... paths)
Specifies the value to use as the convention (default value) to be used when resolving this file collection, if no source paths are explicitly defined.ConfigurableFileCollection
from(java.lang.Object... paths)
Adds a set of source paths to this collection.java.util.Set<java.lang.Object>
getBuiltBy()
Returns the set of tasks which build the files of this collection.java.util.Set<java.lang.Object>
getFrom()
Returns the set of source paths for this collection.ConfigurableFileCollection
setBuiltBy(java.lang.Iterable<?> tasks)
Sets the tasks which build the files of this collection.void
setFrom(java.lang.Iterable<?> paths)
Sets the source paths for this collection.void
setFrom(java.lang.Object... paths)
Sets the source paths for this collection.-
Methods inherited from interface org.gradle.api.Buildable
getBuildDependencies
-
Methods inherited from interface org.gradle.api.file.FileCollection
addToAntBuilder, addToAntBuilder, contains, filter, filter, getAsFileTree, getAsPath, getElements, getFiles, getSingleFile, isEmpty, minus, plus
-
Methods inherited from interface org.gradle.api.provider.HasConfigurableValue
disallowChanges, disallowUnsafeRead, finalizeValue, finalizeValueOnRead
-
Methods inherited from interface org.gradle.api.provider.SupportsConvention
unset, unsetConvention
-
-
-
-
Method Detail
-
getFrom
java.util.Set<java.lang.Object> getFrom()
Returns the set of source paths for this collection. The paths are evaluated as perProject.files(Object...)
.- Returns:
- The set of source paths. Returns an empty set if none.
-
setFrom
void setFrom(java.lang.Iterable<?> paths)
Sets the source paths for this collection. The given paths are evaluated as perProject.files(Object...)
.- Parameters:
paths
- The paths.
-
setFrom
void setFrom(java.lang.Object... paths)
Sets the source paths for this collection. The given paths are evaluated as perProject.files(Object...)
.- Parameters:
paths
- The paths.
-
convention
@Incubating ConfigurableFileCollection convention(java.lang.Iterable<?> paths)
Specifies the value to use as the convention (default value) to be used when resolving this file collection, if no source paths are explicitly defined. If, at the time this method is invoked, the set of source paths for this collection is empty, the convention will be used to resolve this file collection.- Parameters:
paths
- The paths.- Returns:
- this collection
- Since:
- 8.8
-
convention
@Incubating ConfigurableFileCollection convention(java.lang.Object... paths)
Specifies the value to use as the convention (default value) to be used when resolving this file collection, if no source paths are explicitly defined. If, at the time this method is invoked, the set of source paths for this collection is empty, the convention will be used to resolve this file collection.- Parameters:
paths
- The paths.- Returns:
- this collection
- Since:
- 8.8
-
from
ConfigurableFileCollection from(java.lang.Object... paths)
Adds a set of source paths to this collection. The given paths are evaluated as perProject.files(Object...)
.- Parameters:
paths
- The files to add.- Returns:
- this
-
getBuiltBy
java.util.Set<java.lang.Object> getBuiltBy()
Returns the set of tasks which build the files of this collection.- Returns:
- The set. Returns an empty set when there are no such tasks.
-
setBuiltBy
ConfigurableFileCollection setBuiltBy(java.lang.Iterable<?> tasks)
Sets the tasks which build the files of this collection.- Parameters:
tasks
- The tasks. These are evaluated as perTask.dependsOn(Object...)
.- Returns:
- this
-
builtBy
ConfigurableFileCollection builtBy(java.lang.Object... tasks)
Registers some tasks which build the files of this collection.- Parameters:
tasks
- The tasks. These are evaluated as perTask.dependsOn(Object...)
.- Returns:
- this
-
-