Reading a dependency's resource folder for Annotation processing

I’m using a TPL’s annotation classes that requires validating mapping Java types to Property types. It requires reading the TPL’s resource folder under it’s src/main folder.

Looking under the Java plugin in the Gradle User guide it says the following under Incremental Java Compilation Known Issues:

If you are using an annotation processor that reads resources (e.g. a configuration file), you need to declare those resources as an input of the compile task.

Is there an example someone can point me to that declare resources as an input of the compile task?

Any help would be greatly appreciated.

May I should ask my question this way. How do I declare resources as input to the compile task when using an annotation processor?