# Reusing task from projects with include or includeFlat

**URL:** <https://discuss.gradle.org/t/reusing-task-from-projects-with-include-or-includeflat/23864>\
**Category:** Help/Discuss\
**Created:** [August 24, 2017, 9:46pm UTC](https://discuss.gradle.org/t/reusing-task-from-projects-with-include-or-includeflat/23864 "2017-08-24T21:46:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![andreasb70](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/andreasb70/32/6418_2.png) [@andreasb70](https://discuss.gradle.org/u/andreasb70)\
**Post date:** [August 24, 2017, 9:46pm UTC](https://discuss.gradle.org/t/reusing-task-from-projects-with-include-or-includeflat/23864/1 "2017-08-24T21:46:40Z")

</div>

Hello,

Is it possible to store “generic” and "reusable tasks in an independent project and when needed, include it and use the task from another project  
Are there any examples I can look at?

Thanks a lot

---

<div class="post-metadata">

**Author:** ![sterling](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/sterling/32/5395_2.png) [@sterling](https://discuss.gradle.org/u/sterling)\
**Post date:** [August 24, 2017, 10:36pm UTC](https://discuss.gradle.org/t/reusing-task-from-projects-with-include-or-includeflat/23864/2 "2017-08-24T22:36:11Z")

</div>

Yes, although I would phrase it a little differently.

You package custom tasks and common configuration into plugins and share those. The plugins can be binary plugins (in a jar and published somewhere or in `buildSrc`) or they can be shared scripts. More information on organizing build logic: [https://docs.gradle.org/current/userguide/organizing\_build\_logic.html](https://docs.gradle.org/current/userguide/organizing_build_logic.html)

You can get more help from our Gradle guides or training: [https://gradle.org/help/](https://gradle.org/help/)

---

<div class="post-metadata">

**Author:** ![andreasb70](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/andreasb70/32/6418_2.png) [@andreasb70](https://discuss.gradle.org/u/andreasb70)\
**Post date:** [August 25, 2017, 3:48am UTC](https://discuss.gradle.org/t/reusing-task-from-projects-with-include-or-includeflat/23864/3 "2017-08-25T03:48:23Z")

</div>

Thank as lot! That is what I was looking for.  
I did look at the documentation but I guess the amount of all this new information has made me overseen that.
