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

Improve library dependency handling #1082

Closed
de-jcup opened this issue Feb 28, 2022 · 0 comments · Fixed by #1080
Closed

Improve library dependency handling #1082

de-jcup opened this issue Feb 28, 2022 · 0 comments · Fixed by #1080
Labels

Comments

@de-jcup
Copy link
Member

de-jcup commented Feb 28, 2022

Situation

As mentioned inside #1080

It is not enough to just upgrade the SpringBoot version. SpringBoot 2.6.4 upgraded a number of packages: https://github.com/spring-projects/spring-boot/releases/tag/v2.6.4. Some of the packages like slf4j are explicitly mentioned in libraries.gradle. The problem is, we have to upgrade the dependencies in libraries.gradle manually, otherwise we include the same dependencies multiple times.

So we should always use the spring boot library dependencies where possible.

Wanted

It must be very much easier to apply a new spring boot version - without manually updating any library(if possible)

Solution

Spring Boot dependencies

The spring boot dependency management gradle plugin does already manage all spring boot dependencies automatically. To have same libraries in gradle sub projects, where we have no spring boot dependency plugin available, we use now dependagen: https://www.github.com/de-jcup/dependagen

At the moment (v0.2.0) dependagen

  • must be checked out from GIT locally
  • set the spring boot version to use inside template (if necessary)
  • start the main class as described in README.md
  • copy the generated spring_boot_dependagen.gradle to $rootFolder/gradle/spring_boot_dependagen.gradle

Own additional ibraries

Here we use https://github.com/ben-manes/gradle-versions-plugin to check for newer versions available.
We still decide manually if we want to update or not!

Just call:

./gradlew dependencyUpdates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant