Uploaded image for project: 'Gradle'
  1. Gradle
  2. GRADLE-2414

Tooling API appears to ignore gradleUserHomeDir when downloading

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: 1.1
    • Fix Version/s: 1.11-rc-1

      Description

      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.

        Attachments

          Activity

            People

            Assignee:
            radimk Radim Kubacki
            Reporter:
            forums Gradle Forums
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: