Update Gradle to 8.12 and Java to 21 (LTS) with Spring Boot 3.4.1 #4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This PR upgrades the project to use the latest stable LTS versions of Java and Gradle, along with compatible framework updates. The changes ensure the project benefits from modern language features, improved security, and long-term support.
Changes Made
Version Updates
gradle:7-jdk-alpine
eclipse-temurin:21-jdk
openjdk:17-alpine
eclipse-temurin:21-jre
Modified Files
build.gradle
: Updated Spring Boot plugin, dependency management plugin, and source compatibility to Java 21gradle/wrapper/gradle-wrapper.properties
: Updated to Gradle 8.12 distributionDockerfile
: Migrated to Eclipse Temurin (Adoptium) Java 21 images for both build and runtime stages.gitignore
: Added log path exclusion to prevent tracking of runtime log filesUPGRADE_NOTES.md
: Added comprehensive upgrade documentation with migration guideBenefits
Java 21 (LTS)
Gradle 8.12
Spring Boot 3.4.1
Docker Images
Compatibility
✅ No breaking changes - All existing code works without modification
✅ All tests pass - Complete test suite runs successfully
✅ Build verified - Project builds and runs correctly with new versions
✅ Backward compatible - No API or functionality changes required
Testing
Migration Notes
For developers upgrading their local environment:
./gradlew clean build
- no code changes neededSee
UPGRADE_NOTES.md
for detailed migration instructions and compatibility information.Resolves
Closes #[issue-number] - Update Gradle + Java Version
Original prompt
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.