gradle
8.6

# getFileChanges

abstract fun getFileChanges(parameter: FileCollection): Iterable<FileChange>(source)

Changes for a parameter.

When isIncremental is `false`, then all elements of the parameter are returned as ADDED.

Only input file properties annotated with @Incremental or @org.gradle.api.tasks.SkipWhenEmpty can be queried for changes.

Note that for inputs with NONE, instead of a MODIFIED event, file modifications can be reported as a pair of an ADDED and a REMOVED event.

#### Parameters

parameter

The value of the parameter to query.

abstract fun getFileChanges(parameter: Provider<out FileSystemLocation>): Iterable<FileChange>(source)

Changes for a parameter.

When isIncremental is `false`, then all elements of the parameter are returned as ADDED.

This method allows querying properties of type org.gradle.api.file.RegularFileProperty and org.gradle.api.file.DirectoryProperty for changes. These two types are typically used for @org.gradle.api.tasks.InputFile and @org.gradle.api.tasks.InputDirectory properties.

Only input file properties annotated with @Incremental or @org.gradle.api.tasks.SkipWhenEmpty can be queried for changes.

Note that for inputs with NONE, instead of a MODIFIED event, file modifications can be reported as a pair of an ADDED and a REMOVED event.

#### Parameters

parameter

The value of the parameter to query.