Filtering Input/Output Directory


(Ken) #1

I’m using task inputs/ouputs to track down changes in a specific folder. The folder however hosts an .idea folder (used by Intelij IDE). The IDE modifies the files based on your actions inside the IDE. Those are being excluded using .gitignore, but I was wondering if I can do the same things with Gradle.

For example, when creating a new local IDE profile, a file in the .idea folder is being changed. I do not want this change to trigger a new build.Can I exclude the whole .idea folder?

Thanks!


#2

You need to declare the task’s output as well, not only the input. Quoting from chapter 17 of the manual:

A task with no defined outputs will never be considered up-to-date.


(Ken) #3

Oh, I’m sorry! I missed that for some reason. I’ll re-edit the question to just include the filtering. Thanks!