Gradle

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What’s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
To raise new issues or bugs against Gradle, please use forums.gradle.org.
  • Gradle
  • GRADLE-1992

Support for pinned versions (subset of version ranges)

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: New Feature New Feature
  • Status: Open Open
  • Resolution: Unresolved
  • Affects Version/s: someday
  • 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

  • All
  • Comments
  • History
  • Activity
  • TeamCity
  • Commits
  • Source
  • Reviews
There are no comments yet on this issue.

People

  • Assignee:
    Unassigned
    Reporter:
    Robert Watkins
Vote (1)
Watch (1)

Dates

  • Created:
    09/Dec/11 5:40 PM
    Updated:
    09/Dec/11 5:40 PM
  • Atlassian JIRA (v5.0.3#729-sha1:bf569e4)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Gradle. Try JIRA - bug tracking software for your team.