How to get Project object from embedded Gradle (or tooling API)?

Hello, Currently, I’m working on a Gradle support for JBoss Forge ( http://forge.jboss.org/ ). Unfortunately, Gradle tooling API is not sufficient enough for this task, as it only seems to tell us only basic information like dependencies or Java language level. What I need is much beyond that, for example I’d like to list repositories, or plugins used in a build script. I think that having access to org.gradle.api.Project instance evaluated from the build script will give me enough information to make a full model of the project which will be useful for Forge addons.

I tried accessing the Gradle object using GradleLauncher, but it seems to be outdated (I get ClassNotFoundException: org.gradle.cli.CommandLineConverter).

I did that using artifacts from this repository: http://repo.gradle.org/gradle/libs-releases-local/ And with this dependency: compile ‘org.gradle:gradle-core:1.6’ Adding others (base-services, messaging, tooling, wrapper) didn’t help too. This class (CommandLineConverter) is only apparent in core 0.9.2 and 1.0 builds.

I could also make Forge support on the Gradle side but to do that you will have to allow me first :).