Ignore Empty Directories
Attached to an input property to specify that directories should be ignored when snapshotting inputs. Files within directories and subdirectories will be snapshot, but the directories themselves will be ignored. Empty directories, and directories that contain only empty directories will have no effect on the resulting snapshot.
This annotation should be attached to the getter method in Java or the property in Groovy. In Kotlin, use the get: use-site target to attach it to the property getter, for example @get:IgnoreEmptyDirectories. This also works on abstract properties, where the annotation without a use-site target does not compile. Annotations on setters or just the field in Java are ignored.
This annotation can be used with the following annotations:
- org.gradle.api.tasks.InputFiles
- org.gradle.api.tasks.InputDirectory
- org.gradle.api.tasks.SkipWhenEmpty
- org.gradle.api.artifacts.transform.InputArtifact
- org.gradle.api.artifacts.transform.InputArtifactDependencies
Since
6.8