Skip to content

Add support to constraints in DependencyExtractor #34

Description

@mr-thierry

Right now DependencyExtractor only support a list of dependencies in a dependencies block. For example:

 dependencies {
  implementation("heart:of-gold:1.0")
  api(project(":marvin"))

  implementation("b:1.0")
  implementation("a:1.0")
}

DependencyExtractor could be tweaked to also support a list of constraints. For example:

dependencies {
    implementation("heart:of-gold:1.0")
    api(project(":marvin"))

    implementation("b:1.0")
    implementation("a:1.0")

    constraints {
        implementation("org.apache.httpcomponents:httpclient:4.5.3") {
            because("previous versions have a bug impacting this application")
        }
        implementation("commons-codec:commons-codec:1.11") {
            because("version 1.9 pulled from httpclient has bugs affecting this application")
        }
    }
}

This would help fix square/gradle-dependencies-sorter#95

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions