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

Support for pinned versions (subset of version ranges)

    Details

    • Type: New Feature
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None

      Description

      (This is a subset of the larger dependency management issues discussed in GRADLE-646)

      An useful subset of the larger dependency management problem with version ranges is the idea of pinning a dependency down to a specific version. The syntax would look like this:

      group: 'net.twasink', name: 'myartifact', version: '[1.0]'

      This syntax has the advantage of being compatible with both Ivy and Maven.

      Using pinned versions are a very convenient way of dealing with transitive dependencies that bring in newer undesired versions. This can be done manually - using the 'failOnConflict' approach from GRADLE-1899 to detect the conflicts, and then setting up exclusion rules - but that can be a time consuming process, especially for common 3rd-party libraries (e.g. differing, but compatible, versions of commons-lang). It also produces a lot of verbosity. By using this subset of version range matchers, a very common use case ('use exactly this version of that library') is solved. I have a vested interest in this as I have a large set of Maven-based projects that I would love to convert to Gradle, but which use pinned versions for exactly this task.

      (Naturally, if the same dependency has multiple pinned versions in the tree, then a conflict would occur)

      I've developed a bunch of Cucumber tests to drive Gradle and compare its behaviour to Maven. These tests are available at https://github.com/twasink/GradleDependencyTests - see https://github.com/twasink/GradleDependencyTests/blob/master/features/pinned_dependencies.feature in particular.

      The result of the tests (against current Gradle head) is at http://twasink.net/files/gradle_dependency_result_2011_12_09.html

        Activity

        Hide
        bmuschko Benjamin Muschko added a comment -

        As announced on the Gradle blog we are planning to completely migrate issues from JIRA to GitHub.

        We intend to prioritize issues that are actionable and impactful while working more closely with the community. Many of our JIRA issues are inactionable or irrelevant. We would like to request your help to ensure we can appropriately prioritize JIRA issues you’ve contributed to.

        Please confirm that you still advocate for your JIRA issue before December 10th, 2016 by:

        • Checking that your issues contain requisite context, impact, behaviors, and examples as described in our published guidelines.
        • Leave a comment on the JIRA issue or open a new GitHub issue confirming that the above is complete.

        We look forward to collaborating with you more closely on GitHub. Thank you for your contribution to Gradle!

        Show
        bmuschko Benjamin Muschko added a comment - As announced on the Gradle blog we are planning to completely migrate issues from JIRA to GitHub. We intend to prioritize issues that are actionable and impactful while working more closely with the community. Many of our JIRA issues are inactionable or irrelevant. We would like to request your help to ensure we can appropriately prioritize JIRA issues you’ve contributed to. Please confirm that you still advocate for your JIRA issue before December 10th, 2016 by: Checking that your issues contain requisite context, impact, behaviors, and examples as described in our published guidelines . Leave a comment on the JIRA issue or open a new GitHub issue confirming that the above is complete. We look forward to collaborating with you more closely on GitHub. Thank you for your contribution to Gradle!

          People

          • Assignee:
            Unassigned
            Reporter:
            twasink Robert Watkins
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:

              Development