I’ve written a Gradle task which has a property like this:
@Input var directory: Path = defaultDirectory
validateTaskProperties task is complaining:
Task property validation finished with warnings:
- Warning: Task type ‘com.example.plugin.MyTask’: property ‘directory’ has @Input annotation used on property of type java.nio.file.Path.
I could obviously replace
@InputDirectory here, except that the Javadoc for @InputDirectory says the following:
This will cause the task to be considered out-of-date when the directory location or contents have changed. To make the task dependent on the directory location but not the contents, use an
@Input is perfectly legal for a
Path property, and should be used when the task only cares about the location and not about the directory’s contents.
So is there a way of disabling this warning for this particular property please?