Skip to content

Conversation

Copilot
Copy link

@Copilot Copilot AI commented Sep 30, 2025

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

Component Previous Version New Version
Java 17 21.0.8 (LTS)
Gradle 7.4 8.12
Spring Boot 2.6.4 3.4.1
Spring Dependency Management 1.0.11.RELEASE 1.1.7
Docker Build Image gradle:7-jdk-alpine eclipse-temurin:21-jdk
Docker Runtime Image openjdk:17-alpine eclipse-temurin:21-jre

Modified Files

  • build.gradle: Updated Spring Boot plugin, dependency management plugin, and source compatibility to Java 21
  • gradle/wrapper/gradle-wrapper.properties: Updated to Gradle 8.12 distribution
  • Dockerfile: 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 files
  • UPGRADE_NOTES.md: Added comprehensive upgrade documentation with migration guide

Benefits

Java 21 (LTS)

  • Long-term support through 2029, ensuring security patches and stability
  • Modern language features and performance improvements
  • Better garbage collection and JVM optimizations

Gradle 8.12

  • Latest build tool features and performance enhancements
  • Improved dependency resolution and caching
  • Better IDE integration support

Spring Boot 3.4.1

  • Latest security patches and bug fixes
  • Jakarta EE namespace (industry standard)
  • Enhanced observability and metrics

Docker Images

  • Eclipse Temurin is the recommended OpenJDK distribution from Adoptium
  • Actively maintained and regularly updated
  • Better security posture than deprecated OpenJDK 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

  • ✅ Gradle build successful with Java 21 and Gradle 8.12
  • ✅ All unit tests passing (1/1 test suites)
  • ✅ JAR file generated successfully (21MB)
  • ✅ Gradle wrapper functional

Migration Notes

For developers upgrading their local environment:

  1. Install Java 21 (LTS) on your development machine
  2. Update your IDE to use Java 21 SDK
  3. Pull the latest changes - Gradle wrapper will auto-download the correct version
  4. Run ./gradlew clean build - no code changes needed

See UPGRADE_NOTES.md for detailed migration instructions and compatibility information.

Resolves

Closes #[issue-number] - Update Gradle + Java Version

Original prompt

This section details on the original issue you should resolve

<issue_title>Update Gradle + Java Version </issue_title>
<issue_description>The project and its associated Dockerfile are currently using outdated versions of Gradle and Java. These versions should be updated to ensure compatibility, security, performance improvements, and to take advantage of new language and build system features.

Tasks

Update Java version

Upgrade to the latest stable Java LTS version (e.g., Java 17 or 21, depending on project requirements).

Ensure source and target compatibility are updated in build.gradle or gradle.properties.

Adjust codebase where necessary to align with updated Java features.

Update Gradle version

Upgrade to the latest supported Gradle version.

Update Gradle wrapper (gradlew and gradle-wrapper.properties).

Ensure compatibility with updated Java version.

Dockerfile adjustments

Update Docker base image to use the new Java version.

Rebuild and validate Docker image to confirm runtime compatibility.

Compatibility checks

Run full build and test suite to confirm no breaking changes.

Validate dependency compatibility with the new Java and Gradle versions.

Acceptance Criteria

Project builds successfully with the updated Gradle and Java versions.

All unit/integration tests pass without issues.

Docker image builds and runs correctly with the new Java version.

Code is updated (if needed) to leverage new Java features.

</issue_description>

Comments on the Issue (you are @copilot in this section)

Fixes #3

💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

@Copilot Copilot AI changed the title [WIP] Update Gradle + Java Version Update Gradle to 8.12 and Java to 21 (LTS) with Spring Boot 3.4.1 Sep 30, 2025
@Copilot Copilot AI requested a review from Thomas-Mildner September 30, 2025 21:29
Copilot finished work on behalf of Thomas-Mildner September 30, 2025 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update Gradle + Java Version
2 participants