-
Notifications
You must be signed in to change notification settings - Fork 477
Update to Gradle 9 #2202
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
Update to Gradle 9 #2202
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2202 +/- ##
============================================
- Coverage 81.92% 81.92% -0.01%
+ Complexity 4732 4729 -3
============================================
Files 463 463
Lines 14764 14764
Branches 1869 1869
============================================
- Hits 12096 12095 -1
- Misses 1980 1982 +2
+ Partials 688 687 -1 🚀 New features to boost your workflow:
|
Normally, the Spring Boot 2 Gradle Plugin would not be compatible with Gradle 9+ To get around this issue, we use the dependency-management plugin in isolation as described here: https://docs.spring.io/spring-boot/docs/2.7.7/gradle-plugin/reference/htmlsingle/#managing-dependencies.dependency-management-plugin.using-in-isolation This way, we get proper test execution and realistic version resolution on Gradle 9
// as described here: https://docs.spring.io/spring-boot/docs/2.7.7/gradle-plugin/reference/htmlsingle/#managing-dependencies.dependency-management-plugin.using-in-isolation | ||
// This way, we get proper test execution and realistic version resolution on Gradle 9 | ||
id 'org.springframework.boot' version "2.7.18" apply false | ||
id "io.spring.dependency-management" version "1.1.7" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about instead removing the plugin from both places?
It is a relict from times when Gradle did not have built-in BOM support, by now does more harm than good, and even its maintainer recommends not to use it anymore, but instead the built-in BOM support using platform(...)
.
@leonard84 what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I initially wanted this PR to be as non-invasive as possible which is why I opted for this variant.
I agree however that the bom variant would be much simpler.
@Vampire Can you have another look if your findings are fixed, or shall I review that? |
Ah, sorry for the delay, I'll have another look now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thx
Merge activity
|
Mostly regular maintenance.
The most interesting change is the setup of the Spring Boot 2 Gradle plugin (see 61dff17). Instead of applying it (which would lead to various compatibility issues), we just put it on the classpath and use the dependency-management plugin in isolation
as described here. This way we get proper test execution without even needing to apply the plugin.