Gradle
  1. Gradle
  2. GRADLE-1317

Provide a way to exclude a transitive dependency from a shared project

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: 0.9, 0.9.1
    • Fix Version/s: None

      Description

      Currently there is no away (via the DSL) to exclude a transitive dependency of another project in the same multi-project build.

      It seems like the following should work:
      dependencies {
      compile project(':shared')

      { exclude group: 'xerces', module: 'xerces' }

      }

      Note: Adam Murdoch points out that this will with with an extra pair of parentheses around the project. See:
      http://gradle.1045684.n5.nabble.com/Excluding-a-transitive-dependency-from-a-project-tt3344855.html

        Activity

        Hide
        Peter Niederwieser added a comment -

        Bumping priority as it is a common trap.

        Show
        Peter Niederwieser added a comment - Bumping priority as it is a common trap.
        Hide
        Mike M. added a comment -

        Same goes for transitivity of project dependencies:

        earlib (project(':my-subproject')) {
        	transitive = false
        }
        

        Vote++

        Show
        Mike M. added a comment - Same goes for transitivity of project dependencies: earlib (project(':my-subproject')) { transitive = false } Vote++

          People

          • Assignee:
            Unassigned
            Reporter:
            Darren Evenson
          • Votes:
            11 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

            • Created:
              Updated:

              Development