Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wilkinsona opened this issue Nov 9, 2023 · 0 comments

Comments

@wilkinsona
Copy link
Contributor

wilkinsona commented Nov 9, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant