How to generate a list of all tasks in a plugin?

I’m using Gradle for building Android libraries and apps. The build lifecycle is opaque to me currently because I see only the top-level tasks via gradle tasks. However, how can I get a complete list of the internal tasks? For example, I may want to add a .dependsOn(...) to one of them to do some pre-processing.

Also, how a plugin mark some of its tasks to be hidden from the gradle tasks listing?

Have you tried gradlew tasks --all? Basically, tasks are “hidden” if they are not given a group/description and are a dependency of another task.

1 Like