Custom task \ plugin

Hi all.
First of all needless to say how much I love gradle , and appreciate the great job you guys are doing , thumbs up .
Want to have some starting point in the following :
I have a legacy ant build ( old ejbc compilation) which iterates over a folder with *.xml descriptors , and processes each.
Is there a way to somehow imply ‘changed \ not changed’ mechanism for the folder , so gradle will compare , if there wee changes ( xml files added \ deleted ) in the folder , if ‘changed’ - run the task , if not skip it ?

many thanks in advance

Generally speaking, Gradle checks the up-to-date status of a task by looking at its declared inputs and outputs.

In your case, you can annotate a property (or a getter method) of your custom task with @InputDirectory, or simply register this directory as input of your task using the DSL construct task.inputs.dir('/path/to/you/directory')

Thank you Francois , worked perfectly :slight_smile: