Repository navigation
Harmonize Gradle setup - #515
Conversation
📝 WalkthroughWalkthroughThe Gradle build now generates JVM module export and open arguments for RequireJavadoc and rejects empty Possibly related PRs
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@build.gradle`:
- Around line 120-122: Update the comment near the Gradle runtime configuration
to accurately describe the workflow matrix: .github/workflows/gradle.yml runs
the build with Java 17, 21, 25, and 26, rather than always using Java 21 or
passing -PtestJavaVersion.
- Around line 196-198: Update the Gradle CI cache configuration and its
accompanying comment to target Spotless’s default P2 cache at
~/.gradle/caches/p2-data, since build.gradle no longer sets a custom cache
directory. Alternatively, restore an explicit
greclipseConfig.cacheDirectory(...) configuration and keep the cache path
aligned with it.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: b766ecda-d051-4da6-ad99-f830c78a23d0
📒 Files selected for processing (2)
build.gradleprek.toml
| // itself is running under. The job matrix in .github/workflows/gradle.yml does not rely on that | ||
| // default: it runs Gradle under Java 21 in every job and selects the test JVM by passing | ||
| // `-PtestJavaVersion`. |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Correct the workflow description.
.github/workflows/gradle.yml selects Java 17, 21, 25, and 26 from its matrix, then runs ./gradlew build. It does not run Gradle under Java 21 for every job or pass -PtestJavaVersion. Update this comment to describe the actual matrix behavior. (raw.githubusercontent.com)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@build.gradle` around lines 120 - 122, Update the comment near the Gradle
runtime configuration to accurately describe the workflow matrix:
.github/workflows/gradle.yml runs the build with Java 17, 21, 25, and 26, rather
than always using Java 21 or passing -PtestJavaVersion.
| greclipseConfig.withP2Mirrors([ | ||
| "https://download.eclipse.org/": "https://mirror.umd.edu/eclipse/", | ||
| // Not a no-op: Spotless rewrites every P2 repository through the map if it exists. |
There was a problem hiding this comment.
🚀 Performance & Scalability | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/usr/bin/env bash
set -euo pipefail
rg -n 'cacheDirectory|spotless-p2|p2-data' build.gradle .github/workflows/gradle.ymlRepository: plume-lib/lookup
Length of output: 658
🏁 Script executed:
#!/usr/bin/env bash
set -euo pipefail
sed -n '160,230p' build.gradle
printf '\n--- workflow cache section ---\n'
sed -n '1,60p' .github/workflows/gradle.yml
printf '\n--- full spotless/greclipse/p2 references ---\n'
rg -n 'greclipseConfig|spotless|cacheDirectory|p2|spotless-p2|caches/p2-data' build.gradle .github/workflows/gradle.ymlRepository: plume-lib/lookup
Length of output: 4398
🌐 Web query:
Spotless greclipse cacheDirectory P2 data directory Spotless Groovy-Eclipse
💡 Result:
In the Spotless Gradle plugin, the P2 data directory—used by Eclipse-based formatters like Groovy-Eclipse (greclipse)—is the location where downloaded Eclipse dependencies and metadata are stored [1][2]. As of Spotless Gradle plugin v8.6.0, you can explicitly configure this location using the cacheDirectory method [1][3]. Default Behavior By default, the plugin stores P2 data in
Citations:
- 1: Allow setting the local P2 cache dir in the Spotless Gradle plugin diffplug/spotless#2944
- 2: https://github.com/diffplug/spotless/blob/main/plugin-gradle/CHANGES.md
- 3: https://github.com/diffplug/spotless/releases/tag/gradle%2F8.6.0
Align the CI P2 cache with the Spotless default cache.
build.gradle no longer sets a custom P2 cache directory, while the old comment says it does. Since Spotless uses Gradle user home caches/p2-data by default, .github/workflows/gradle.yml caches the wrong path and can miss the formatter P2 data. Update the workflow path/comment to ~/.gradle/caches/p2-data, or keep the explicit greclipseConfig.cacheDirectory(...) call and continue caching that directory.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@build.gradle` around lines 196 - 198, Update the Gradle CI cache
configuration and its accompanying comment to target Spotless’s default P2 cache
at ~/.gradle/caches/p2-data, since build.gradle no longer sets a custom cache
directory. Alternatively, restore an explicit
greclipseConfig.cacheDirectory(...) configuration and keep the cache path
aligned with it.
No description provided.