[GRADLE-2414] Tooling API appears to ignore gradleUserHomeDir when downloading Created: 01/Aug/12 Updated: 21/Jan/14 Resolved: 20/Jan/14
|Reporter:||Gradle Forums||Assignee:||Radim Kubacki|
I'm trying to call the Tooling API from Jenkins, which enforces a read-only home directory. I can't just leave GRADLE_USER_DIR along, because of the read-only shared home directory, so I set it to $WORKSPACE, which works fine for gradlew. When I get into my test code and it goes to make a connection using the tooling API, I run into a similar problem, so I go to set DefaultGradleConnector.useGradleUserHomeDir.
That doesn't work though. I traced it through, and it looks like DefaultGradleConnector.connect() is calling distributionFactory.getDefaultDistribution without passing in connectionParameters.useGradleUserHomeDir. Digging deeper, it looks like DistributionFactory is solely configured in its constructor from ConnectorServices. The value is the default home directory .gradle dir and there isn't a way for the DefaultGradleConnector.connectionParameters.useGradleUserHomeDir to get to DistributionFactory.
Can someone confirm that what I'm talking about (tooling api ignoring DefaultGradleConnector.connectionParameters.useGradleUserHomeDir)? If someone confirms this, I can submit a pull request. Am I missing something? Without a configurable distribution download the subsequent connectionFactory.create doesn't really make sense.
|Comment by Gradle Forums [ 01/Aug/12 ]|
You're right - it is a problem. Tooling api uses the gradleUserHome dir by passing it via the start parameters to the build. However, it is not used for the getting the distro. Please submit a ticket & pull request
Thanks a lot for this report!
|Comment by Radim Kubacki [ 20/Jan/14 ]|
Waiting for review and possibly can get into 1.11.
Per Luke's comment I will also add a test that any daemons started when using a custom user home dir use this as their working space.
|Comment by Radim Kubacki [ 21/Jan/14 ]|
Cherry-picked into release branch because I didn't know that I should push it there first.