# Filtering Input/Output Directory

**URL:** <https://discuss.gradle.org/t/filtering-input-output-directory/15301>\
**Category:** Help/Discuss\
**Created:** [March 20, 2016, 5:31pm UTC](https://discuss.gradle.org/t/filtering-input-output-directory/15301 "2016-03-20T17:31:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sypke](https://avatars.discourse-cdn.com/v4/letter/s/7cd45c/32.png) [@Sypke](https://discuss.gradle.org/u/Sypke)\
**Post date:** [March 20, 2016, 5:31pm UTC](https://discuss.gradle.org/t/filtering-input-output-directory/15301/1 "2016-03-20T17:31:11Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Moe](https://avatars.discourse-cdn.com/v4/letter/m/ad7895/32.png) [@Moe](https://discuss.gradle.org/u/Moe)\
**Post date:** [March 20, 2016, 5:44pm UTC](https://discuss.gradle.org/t/filtering-input-output-directory/15301/2 "2016-03-20T17:44:21Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Sypke](https://avatars.discourse-cdn.com/v4/letter/s/7cd45c/32.png) [@Sypke](https://discuss.gradle.org/u/Sypke)\
**Post date:** [March 20, 2016, 5:55pm UTC](https://discuss.gradle.org/t/filtering-input-output-directory/15301/3 "2016-03-20T17:55:32Z")

</div>

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