I’m writing some tasks and I’d like more control over how they appear in the output of “gradle tasks”. I haven’t found anything in the docs that describe how gradle decides to build this output. I have found Why does my task not show up in “gradle tasks”? which helped a lot.
Specifically, I have a task (let’s call it cleanup) on which no other task depends, but I don’t want it to show up in “gradle tasks”. I’d really like it to show up in “gradle tasks --all” as a subtask of my master task. At the moment I have
master.finalizedBy cleanup
but nothing that makes master depend on cleanup.
I’m not sure gradle has enough information to decide where to put the cleanup task at the moment. I’d love to hear ideas on good ways to pull this off.
Thanks.
-DB