File Collection
A FileCollection
represents a collection of file system locations which you can query in certain ways. A file collection is can be used to define a classpath, or a set of source files, or to add files to an archive.
There are no methods on this interface that allow the contents of the collection to be modified. However, there are a number of sub-interfaces, such as ConfigurableFileCollection that allow changes to be made.
A file collection may contain task outputs. The file collection tracks not just a set of files, but also the tasks that produce those files. When a file collection is used as a task input property, Gradle will take care of automatically adding dependencies between the consuming task and the producing tasks.
You can obtain a FileCollection
instance using files.
Inheritors
Types
Functions
FileCollection
which contains the difference between this collection and the given collection.FileCollection
which contains the union of this collection and the given collection.