Why does my task not show up in "gradle tasks"?

I’m attempting to create a Custom Plugin and am at a point that I wish to try and use it, but it is not working. When I execute ‘gradle tasks’ I’d expect the tasks in my custom plugin to be listed, but they are not. Is there something special one has to do in order to get the tasks in a custom plugin to be listed when the ‘tasks’ task is executed?

The logic is the same for all tasks, whether they are declared in a build script or added by a plugin. A task will show up in ‘gradle tasks’ if no other task depends on it or the task has a value set for its ‘group’ property. ‘gradle tasks --all’ will show all tasks.

1 Like