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

Gradle Tooling API not obeying Gradle Wrapper settings for subprojects

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.0-milestone-7

      Description

      When the Gradle Tooling API is invoked directly via a subproject it doesn't obey the gradle wrapper version from the parent project.

      I discovered this while experimenting with http://static.springsource.org/spring-security/site/source.html

      This project seems to the same bug as spring-integration: http://issues.gradle.org/browse/GRADLE-1701

      However, its gradle wrapper specifies to use M3 (which means that it should not hit the bug).

      It indeed does not hit the bug when the model gets built from the root project. However, when requesting a model build from one of the subprojects (such as will happen in STS if you perform a "refresh dependencies" operation on a specific subproject) then it seems to fall back to using the tooling api's default version rather than the wrapper default. In this case it will hit the bug (and the error message indicates M4 was being used).

      In my mind this is a rather serious bug because it causes very unpredictable behavior for multi-project builds in the IDE, where it somewhat randomly varies which gradle version you end up using depending on things such as project build order etc.

        Activity

        Hide
        kdvolder Kris De Volder added a comment -

        Task execution is also affected:
        https://issuetracker.springsource.com/browse/STS-2201

        In some cases this means it is impossible to execute any tasks on subprojects in STS. For example, a project like spring-security which has a build that only works with M3 is severely affected.

        When trying to execute any task on a subproject, the api will ignore the wrapper settings, switch to using M4 and crash.

        Show
        kdvolder Kris De Volder added a comment - Task execution is also affected: https://issuetracker.springsource.com/browse/STS-2201 In some cases this means it is impossible to execute any tasks on subprojects in STS. For example, a project like spring-security which has a build that only works with M3 is severely affected. When trying to execute any task on a subproject, the api will ignore the wrapper settings, switch to using M4 and crash.

          People

          • Assignee:
            Unassigned
            Reporter:
            kdvolder Kris De Volder
          • Votes:
            3 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development