gradle
8.2

# fileCollection

abstract fun fileCollection(dependencySpec: Spec<out Any>): FileCollection

Resolves this configuration lazily. The resolve happens when the elements of the returned FileCollection get accessed the first time. This locates and downloads the files which make up this configuration. Only the resulting set of files belonging to the subset of dependencies specified by the dependencySpec is contained in the FileCollection.

#### Return

The FileCollection with a subset of dependencies of this configuration.

#### Parameters

dependencySpec

The spec describing a filter applied to the all the dependencies of this configuration (including dependencies from extended configurations).

abstract fun fileCollection(dependencySpecClosure: Closure): FileCollection

Takes a closure which gets coerced into a Spec. Behaves otherwise in the same way as fileCollection.

#### Return

The FileCollection with a subset of dependencies of this configuration.

#### Parameters

dependencySpecClosure

The closure describing a filter applied to the all the dependencies of this configuration (including dependencies from extended configurations).

abstract fun fileCollection(dependencies: Array<Dependency>): FileCollection

Resolves this configuration lazily. The resolve happens when the elements of the returned FileCollection get accessed the first time. This locates and downloads the files which make up this configuration. Only the resulting set of files belonging to specified dependencies is contained in the FileCollection.

#### Return

The FileCollection with a subset of dependencies of this configuration.

#### Parameters

dependencies

The dependencies for which the FileCollection should contain the files.