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.