Skip to content

Allow configurations to be included in and excluded from global dependency management #369

Open
@wilkinsona

Description

@wilkinsona

At the moment, global dependency management is applied to every visible configuration. This ensures consistency but causes problems like detekt/detekt#6198 and spring-projects/spring-boot#38269. These problems can be avoided today by using configuration-specific dependency management but that's a little cumbersome and makes it hard for users to broaden the dependency management that's been configured elsewhere as it essentially has to be declared again.

It would be useful if it was possible to configure the configurations to which global dependency management applies. For example, Spring Boot could configure global dependency management as it does today but only include certain configurations (compileClasspath, runtimeClasspath, testCompileClasspath, and so on) in that dependency management by default. Users could then include others as needed by doing something like this:

dependencyManagement {
    global {
        configurations {
            include "anotherConfiguration"
            exclude "testRuntimeClasspath"
        }
    }
}

In the example above, global may clash with configuration-specific dependency management for a configuration named global. This could be avoided with some improvements to the DSL.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions