Skip to content

Upgrade Java version from 17 to 21 (latest LTS)#2

Open
devin-ai-integration[bot] wants to merge 2 commits into
mainfrom
devin/1765481490-upgrade-java-21
Open

Upgrade Java version from 17 to 21 (latest LTS)#2
devin-ai-integration[bot] wants to merge 2 commits into
mainfrom
devin/1765481490-upgrade-java-21

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Dec 11, 2025

Copy link
Copy Markdown

Description

Upgrades the project from Java 17 to Java 21 (the latest LTS version). This includes updating the build configuration and CI workflow to target Java 21.

Changes

  • Updated java.sourceCompatibility to VERSION_21 in build.gradle.kts
  • Updated Kotlin jvmTarget to "21" in build.gradle.kts
  • Updated Detekt jvmTarget from "14" to "21" in build.gradle.kts
  • Updated GitHub Actions workflow to use JDK 21
  • Updated JaCoCo from 0.8.7 to 0.8.12 (required for Java 21 support - older version doesn't support class file major version 65)

Compatibility Notes

The current dependencies are compatible with Java 21:

  • Spring Boot 3.2.3 - supports Java 21
  • Kotlin 1.9.20 - supports Java 21
  • Spring Data Elasticsearch 5.2.3 - supports Java 21

JaCoCo required an upgrade from 0.8.7 to 0.8.12 to support Java 21 class files. No other dependency updates were required.

Test Compatibility

All unit, integration, and functional tests pass on Java 21. No test code changes were required - tests are Java-version agnostic (no @DisabledOnJre or version-specific logic found).

Type of change

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Note: This is a breaking change for any consumers who are still on Java 17 runtime.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have added examples for the new scenarios in the relevant modules

Human Review Checklist

  • Verify CI passes with Java 21
  • Confirm runtime environments will be updated to Java 21 before deployment
  • Note: Detekt jvmTarget was updated from 14 (not 17) to 21
  • Verify JaCoCo 0.8.12 is acceptable (upgraded from 0.8.7 for Java 21 support)

Link to Devin run: https://lowes.devinenterprise.com/sessions/d8387dc8691943908b837ac02845b883
Requested by: harsha.shivakumar@lowes.com (@harshaskumar05)

- Update java.sourceCompatibility to VERSION_21 in build.gradle.kts
- Update kotlinOptions.jvmTarget to 21 in build.gradle.kts
- Update Detekt jvmTarget to 21 in build.gradle.kts
- Update GitHub Actions workflow to use JDK 21

Co-Authored-By: harsha.shivakumar@lowes.com <harshaskumar05@gmail.com>
@devin-ai-integration

Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

JaCoCo 0.8.7 does not support Java 21 class files (major version 65).
JaCoCo 0.8.12 adds support for Java 21.

Co-Authored-By: harsha.shivakumar@lowes.com <harshaskumar05@gmail.com>
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.

0 participants