Reusing task from projects with include or includeFlat

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

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

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

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.