Getting publications from Gradle project using the Tooling API


Using the Gradle tooling API I want to access the Maven publications of a given Gradle project. Does anyone know how?

I already used the Project Interface quiet a bit, in getting configurations and dependencies of gradle projects. But now I want to know the Maven publishing meta-data. I think this is described in the Maven Publication Interface. I’ve found mentions of getPublications() methods in: org.gradle.api.publish and org.gradle.tooling.model.gradle, but no such methods are implemented in the project interface.