Skip to content

Upgrade to Java 17 and update dependencies#567

Open
devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
devin/1776886379-java17-upgrade
Open

Upgrade to Java 17 and update dependencies#567
devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
devin/1776886379-java17-upgrade

Conversation

@devin-ai-integration
Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration Bot commented Apr 22, 2026

Summary

Upgrades build.gradle to target Java 17 and bumps core plugins and dependencies:

  • sourceCompatibility / targetCompatibility17
  • Spring Boot 2.6.32.7.18
  • io.spring.dependency-management 1.0.11.RELEASE1.0.15.RELEASE
  • com.diffplug.spotless 6.2.16.22.0
  • mybatis-spring-boot-starter (+ test starter) 2.2.22.3.2
  • graphql-dgs-spring-boot-starter 4.9.215.5.1
  • io.jsonwebtoken JJWT 0.11.20.11.5
  • org.xerial:sqlite-jdbc 3.36.0.33.42.0.0
  • io.rest-assured:* 4.5.15.3.2
  • Added --add-opens JVM args to the test task for Java 17 module encapsulation.

Deviations from the requested spec (needed to get ./gradlew clean build green):

  • com.netflix.dgs.codegen plugin: requested 5.6.8 does not exist on Maven Central (the 5.x line jumps from 5.4.x to 5.12.x). Used 5.12.4 instead.
  • graphql-java override: Spring Boot 2.7's BOM pins graphql-java to 18.5, but DGS 5.5.1 requires [19.2, 20) and fails at runtime with NoSuchMethodError in Federation.java. Added a resolutionStrategy forcing graphql-java:19.2.
  • rest-assured override: Spring Boot BOM pins rest-assured-common and spring-commons to 4.5.1, causing a NoSuchMethodError in ParamConfig at runtime. Added a resolutionStrategy forcing all io.rest-assured:* artifacts to 5.3.2.
  • DGS codegen PageInfo typeMapping: DGS codegen 5.12.4 now generates a PageInfo type from the schema, but the existing ArticleDatafetcher / CommentDatafetcher code uses graphql.relay.PageInfo (via DefaultPageInfo). Added typeMapping = ["PageInfo": "graphql.relay.PageInfo"] to the generateJava task so the generated connections keep using graphql.relay.PageInfo. This avoids touching the datafetcher source code.
  • spotlessApply reformatted DefaultJwtServiceTest.java (unavoidable under the new Spotless version).

./gradlew clean build passes locally on Java 17 (all 68 tests green).

Review & Testing Checklist for Human

  • Confirm the com.netflix.dgs.codegen version substitution (5.12.4 instead of the requested-but-nonexistent 5.6.8) is acceptable, or specify a different version.
  • Review the two resolutionStrategy.eachDependency overrides (graphql-java:19.2, io.rest-assured:*:5.3.2). These were added to resolve transitive version conflicts between the Spring Boot 2.7 BOM and DGS 5.5.1 / rest-assured 5.3.2. Make sure forcing these versions doesn't conflict with any other requirements you have in mind.
  • Review the typeMapping added to the generateJava task. It's the least-invasive way to preserve the existing graphql.relay.PageInfo usage, but an alternative would be to rewrite the datafetchers to use the generated io.spring.graphql.types.PageInfo.
  • Smoke-test the app end-to-end beyond the unit tests: run ./gradlew bootRun, then hit /tags, register/login via REST (POST /users, POST /users/login), create an article, and exercise the GraphQL endpoint (/graphiql) — especially paginated queries (articles, feed) since they touch the upgraded DGS + PageInfo plumbing.
  • The GitHub Actions workflow (.github/workflows/gradle.yml) still pins Java 11; CI will need Java 17 to build after this PR (not changed here, intentionally out of scope — flagging so you can update it alongside this change).

Notes

  • The clean / build Gradle warning about spotlessJava missing implicit task dependencies is pre-existing and unrelated to this upgrade.

Link to Devin session: https://app.devin.ai/sessions/e2be5da860b24acc915d6e640607dc9f
Requested by: @vanessasalas-cog


Open in Devin Review

Co-Authored-By: vanessa.salas <vanessa.salas@cognition.ai>
@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

Copy link
Copy Markdown
Author

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in Devin Review

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.

1 participant