How to determine where a task comes from

Is there a way to determine which plugin adds a particular task to a project?

I can list all tasks gradle tasks, or view details about particular tasks gradle help --task <name>, and while these tell me which grouping tasks are part of, they don’t tell me why this task was added to the project.

Knowing which plugin added the task would make it easier to search for relevant documentation when debugging build scripts.

As a first stop, I would run the model task and look at the package names of the tasks. That would give me a rough idea of where they are coming from.

Not exactly what I’m looking for, but nonetheless helpful; thanks!

Other ideas appreciated.

When i run gradlew help --task , it gives me project paths within my multiproject build where the particular task is declared. It also gives me the exact Java type of this particular task, whose package can give you a hint about where does the task come from. You can also check with your projects if the plugin is included there.