Add Spotless Maven plugin for code formatting #10
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.
What problem(s) was I solving?
The project lacked automated code formatting, which can lead to inconsistent code style across contributions and make code reviews more tedious due to style-related changes mixed with logical changes.
Additionally, the build was using JDK 11 in CI, but the Spotless Maven plugin (v3.0.0) requires JDK 17 to run.
What user-facing changes did I ship?
No user-facing changes. This is a developer tooling improvement.
How I implemented it
mvn spotless:applyThe build now:
--release 11to ensure JDK 11 compatibilityspotless:checkduring the build to enforce formattingHow to verify it
Manual Testing
mvn clean verifypassesDescription for the changelog
Add Spotless Maven plugin with Google Java Format for automated code formatting. Build now requires JDK 17 via toolchains while maintaining JDK 11 target compatibility.