How to add taskExecutionListener using gradle-tooling API


(jomblick.21) #1

Hi,

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.


(Szczepan Faber) #2

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: http://www.gradle.org/docs/current/javadoc/org/gradle/tooling/BuildLauncher.html#setStandardOutput(java.io.OutputStream)

Hope that helps!