Tooling api - support for relative paths in


I’m having some difficulty using the gradle tooling api with relative paths in set in gradle.properies.

A simple example of this:

If I use the tooling API to run a build from a project with the above set, I get an error “Could not fetch model of type ‘GradleProject’ using Gradle distribution”

If I use the gradle wrapper from the root of the project, it works fine.

Another example of using relative paths in"../../../../modules/Common/security/cacerts"<trust-password>

Is there any way I can specify the “current working directory”, or similar, to let gradle run it’s build from the root of the corresponding project, to ensure relative paths work?

Is this limitation of the tooling API well known and is there any documentation that states this limitation of the tooling api?

I’ve found a similar bug report for intellij (which i assume uses the tooling api):

Thanks in advance for any advice on this.

This (very old) thread seems related: Is it possible to set the process 'cwd' (aka 'working directory') via the tooling API?