Is there some way to fetch all the tasks for a gradle plugin

Given I have the instance of the Plugin Class, is it possible to fetch all the tasks associated with the Plugin.

I believe the answer is no. What are you trying to do?

Given an instance of the plugin class, Chris is right: nope.

Given the plugin ID and version, one could execute some builds via the Tooling API with the plugin before and after application and collect the difference.

It certainly wouldn’t be as easy as we’d like. I would like to make users more aware of what tasks/rules a plugin adds.

There is an internal feature in Gradle to dump a “trace” of what happened during the build. This trace includes plugin applications and task creations/registrations. It is possible to extract the data you want from this, with some more work, and less work than using the Tooling API.

You can dump a trace for an invocation by adding -Dorg.gradle.internal.operations.trace. This creates 3 files with roughly the same data, but in different forms.

Please keep in mind that nothing about this functionality is guaranteed to be stable.

Thanks Guys. This is informative and asserts my understanding.