-
Notifications
You must be signed in to change notification settings - Fork 127
Upgrade Gradle to 9 along with JDK and Spotless #880
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
base: main
Are you sure you want to change the base?
Conversation
WalkthroughThe project build configuration was updated to use Gradle 9, Java 17, and newer plugin versions. The Spotless plugin and Google Java Format were upgraded, and Docker Compose now uses OpenJDK 17. Deprecated Gradle properties were replaced with their modern equivalents. No changes were made to source code or public APIs. Changes
Sequence Diagram(s)sequenceDiagram
participant Developer
participant Gradle Wrapper
participant Build Plugins
participant Docker Compose
Developer->>Gradle Wrapper: Run build/test
Gradle Wrapper->>Build Plugins: Use Gradle 9, Java 17, Spotless 6.25.0, Google Java Format 1.10.0 (AOSP)
Developer->>Docker Compose: Start "package" service
Docker Compose->>Docker: Use OpenJDK 17 image
Estimated code review effort🎯 2 (Simple) | ⏱️ ~7 minutes Assessment against linked issues
Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. ✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (2)
docker-compose.yml (1)
3-3
: Pin the JDK image to a fixed patch tag for reproducible builds
azul/zulu-openjdk:17-latest
floats to whatever Azul ships next. This can break CI the day a new 17.x patch appears (e.g. 17.0.20 → 17.0.22). Prefer a deterministic tag such as:- image: azul/zulu-openjdk:17-latest + image: azul/zulu-openjdk:17.0.22You still get security updates by bumping the tag deliberately and reviewing the diff.
build.gradle (1)
22-24
: Avoid duplicated archive naming – keep it in one placeYou now set the base archive name twice:
base { archivesName.set('meilisearch-java') }
(new)buildJar { archiveBaseName = 'meilisearch-java' }
(existing)If one of them drifts, you’ll get two differently-named JARs in
build/libs
. Drop one (prefer thebase
block) or referenceproject.archiveBaseName
inside the custom task to stay DRY.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
build.gradle
(3 hunks)docker-compose.yml
(1 hunks)gradle/wrapper/gradle-wrapper.properties
(1 hunks)
🔇 Additional comments (4)
gradle/wrapper/gradle-wrapper.properties (1)
3-3
: Confirm wrapper JAR + plugin stack are really Gradle 9-ready
distributionUrl
now targets Gradle 9 GA. Make sure:
gradle/wrapper/gradle-wrapper.jar
was regenerated (./gradlew wrapper --gradle-version 9.0.0
) and committed; otherwise CI will still download the old bootstrapper.- All applied plugins (Spotless 6.25.0, nexus-publish, etc.) were tested against Gradle 9 to catch any runtime incompatibilities early.
A quick smoke-run locally or in CI should surface problems, but please double-check before merging.
build.gradle (3)
16-17
: Spotless upgrade looks goodBumping to 6.25.0 is required for Gradle 9 and has no breaking changes for Java formatters.
123-124
: Java 17 target – validate dependency compatibilityRaising
sourceCompatibility
/targetCompatibility
to 17 is aligned with the new Docker image, but a few dependencies (e.g.json:20250517
,jackson-databind:2.19.0
) historically lag behind latest JDKs. Please run the full test matrix on JDK 17 before merging to ensure no reflective-access or module-system issues surface.
199-199
: Formatter bump acknowledgedUpdating Google Java Format to 1.10.0 (AOSP) syncs with Spotless 6.x; no concerns.
Pull Request
Related issue
Fixes #869
What does this PR do?
PR checklist
Please check if your PR fulfills the following requirements:
Thank you so much for contributing to Meilisearch!
Summary by CodeRabbit