Skip to content

Harmonize Gradle setup - #515

Merged
mernst merged 1 commit into
plume-lib:masterfrom
mernst:gradle-review
Aug 7, 2026
Merged

mernst merged 1 commit into
plume-lib:masterfrom
mernst:gradle-review

Conversation

@mernst

@mernst mernst commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The Gradle build now generates JVM module export and open arguments for RequireJavadoc and rejects empty testJavaVersion values. Test logging includes passed tests. Spotless and P2 cache configuration is updated, and javadocPrivate is grouped under documentation. Compile-classpath comments describe deferred resolution. Pre-commit hooks now format Java and Gradle files separately, and the end-to-end test-data exclusion matches recursively.

Possibly related PRs

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between a68bcf3 and 4d4f547.

📒 Files selected for processing (2)
  • build.gradle
  • prek.toml

Comment thread build.gradle
Comment on lines +120 to +122
// 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`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 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.

Comment thread build.gradle
Comment on lines 196 to +198
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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🚀 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.yml

Repository: 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.yml

Repository: 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 $GRADLE_USER_HOME/caches/p2-data [3][2]. Previously, this directory often defaulted to locations such as ~/.m2/repository/dev/equo/p2-data [1][2]. How to Configure You can override the default P2 cache location for the greclipse formatter within your build.gradle file by adding the cacheDirectory method to the greclipse step [1][3]: spotless { groovy { greclipse.cacheDirectory(file("${layout.buildDirectory.get}/spotless-p2-cache")) } } This allows you to move the P2 cache directory into your project's build directory or any other location of your choosing, which is particularly useful for managing CI environments where you may want to avoid using home directory paths [1]. The cacheDirectory method is also available for other Eclipse-based formatters, including eclipse (JDT) and eclipseCdt [3].

Citations:


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.

@mernst
mernst merged commit 7a970f1 into plume-lib:master Aug 7, 2026
6 of 10 checks passed
@mernst
mernst deleted the gradle-review branch August 7, 2026 21:47
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