Advanced Tasks - Gradle User Manual To query incremental changes for an input file property, that property must always return the same instance The easiest way to accomplish this is to use one of the following property types: RegularFileProperty, DirectoryProperty or ConfigurableFileCollection
InputChanges. getFileChanges () doesnt accept . . . - GitHub To query incremental changes for an input file property, that property always needs to return the same instance Your val doesn't This can be easily fixed by doing a variation of: project configurations getByName("runtimeClasspath") resolvedConfiguration files
Incremental build - Gradle User Manual In the event that a file matches a rule, but cannot be loaded as a properties file (e g because it is not formatted properly or uses a non-standard encoding), it will be incorporated into the up-to-date or build cache key calculation as a normal file
Working With Files - Gradle User Manual Lazy creation of a file collection is useful when evaluating the files that make up a collection when a build runs In the following example, we query the file system to find out what files exist in a particular directory and then make those into a file collection:
Incremental (Gradle API 9. 5. 1) Inputs annotated with Incremental can be queried for changes via InputChanges getFileChanges(org gradle api file FileCollection) or InputChanges getFileChanges(org gradle api provider Provider)