How to add taskExecutionListener using gradle-tooling API


I have plugin and which has a task. i’m executing this task using ‘GradleConnector’ from a seperate Java class. Now i would like to know whether this task is skipped or not. i know that With TaskExceutionListener we will be able to get that information. But how to use TaskExecutionlistener with Gradle tooling API.

Can you elaborate on the context of your use of the Tooling API? Perhaps there’s some other solution to the problem but first we need to find out what is the use case.

Information whether the task was skipped or not is not explicitly available in the tooling api. You could work around by parsing the standard output from the build, see:

Hope that helps!