Access the path to jacocoagent.jar in gradle using the JaCoCo plugin?

Is there a way to access the path to the jacocoagent.jar used by the Gradle JaCoCo plugin?

I want to use to use it in JVM arguments to get code coverage when testing a GAE dev instance.


jvmFlags = ["-javaagent:${<path to agent jar>}=destfile=${buildDir}/jacoco/jacoco.exec"]

Also, is there a better way of getting jacoco coverage of a GAE?


Not that this will resolve the configuration, which will prevent it to be modified after that.
This should not be a problem for this specific usage, as usually the jacocoAgent configuration is specified once and for all.