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

Recipe to remove versions from spring-boot managed Gradle dependencies #115

Open
billkoch opened this issue Nov 5, 2021 · 0 comments
Open
Labels
discovery Investigate and determine what should be done enhancement New feature or request question Further information is requested

Comments

@billkoch
Copy link

billkoch commented Nov 5, 2021

An issue I've seen while upgrading spring-boot is projects declaring their own version for a dependency that spring-boot manages out of the box. Allowing spring-boot to control the version of dependencies ideally makes future upgrades easier, as they maintain a curated list of compatible dependencies.

While there certainly are cases for pinning the version by setting version properties for the dependency, when a project declares a dependency with a particular version themselves, I've found it tends to be from lack of awareness that spring-boot will manage the version for them.

For example:

// build.gradle

dependencies {
  implementation 'com.google.code.gson:gson:2.8.0'
}

Should instead be:

// build.gradle

dependencies {
  // Let spring-boot pin the version
  implementation 'com.google.code.gson:gson'
}

Such a feature could examine other BOM files as well, such as: org.springframework.cloud:spring-cloud-dependencies.

While this may be gated by the Gradle AST becoming more mature, does this seem like a feature you all would like to support?

@aegershman aegershman added discovery Investigate and determine what should be done enhancement New feature or request labels Nov 6, 2021
@rpau rpau added the question Further information is requested label May 24, 2023
@timtebeek timtebeek changed the title Recipe to remove versions from spring-boot managed dependencies Recipe to remove versions from spring-boot managed Gradle dependencies Nov 29, 2023
@timtebeek timtebeek moved this to Recipes Wanted in OpenRewrite Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discovery Investigate and determine what should be done enhancement New feature or request question Further information is requested
Projects
Status: Recipes Wanted
Development

No branches or pull requests

3 participants