Skip to content

Always use CI-local "gradle", instead of gradlew#15667

Merged
Siedlerchr merged 3 commits into
mainfrom
refine-gradle
May 3, 2026
Merged

Always use CI-local "gradle", instead of gradlew#15667
Siedlerchr merged 3 commits into
mainfrom
refine-gradle

Conversation

@koppor

@koppor koppor commented May 3, 2026

Copy link
Copy Markdown
Member

Now that gradle/gradle#34227 is merged, we can make use of gradle action's caching feature also on Windows.

Steps to test

See binaries workflow passing

Checklist

  • I own the copyright of the code submitted and I license it under the MIT license
  • [/] I manually tested my changes in running JabRef (always required)
  • [/] I added JUnit tests for changes (if applicable)
  • [/] I added screenshots in the PR description (if change is visible to the user)
  • [/] I added a screenshot in the PR description showing a library with a single entry with me as author and as title the issue number
  • [/] I described the change in CHANGELOG.md in a way that can be understood by the average user (if change is visible to the user)
  • [/] I checked the user documentation for up to dateness and submitted a pull request to our user documentation repository

@qodo-free-for-open-source-projects

Copy link
Copy Markdown
Contributor

Review Summary by Qodo

Use CI-local gradle instead of gradlew in build workflows

✨ Enhancement

Grey Divider

Walkthroughs

Description
• Replace ./gradlew with CI-local gradle command in workflows
• Remove outdated comment referencing gradle/gradle#34227
• Update documentation to use ./gradlew in contributing guide
Diagram
flowchart LR
  A["Gradle Wrapper<br/>./gradlew"] -->|"Replace with"| B["CI-local<br/>gradle"]
  B -->|"Enables"| C["Gradle Action<br/>Caching"]
  C -->|"Improves"| D["Windows Build<br/>Performance"]
Loading

Grey Divider

File Changes

1. .github/workflows/binaries.yml ⚙️ Configuration changes +3/-4

Replace gradlew with gradle in build matrix

• Changed gradleCommand from ./gradlew to gradle for Windows, macOS-intel, and macOS-silicon
 build matrices
• Removed outdated comment explaining Windows gradlew usage referencing gradle/gradle#34227
• Enables CI-local gradle caching feature across all platforms

.github/workflows/binaries.yml


2. CONTRIBUTING.md 📝 Documentation +1/-1

Add ./ prefix to gradlew command

• Updated commented documentation to use ./gradlew check instead of gradlew check
• Maintains consistency with local development practices

CONTRIBUTING.md


Grey Divider

Qodo Logo

@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented May 3, 2026

Copy link
Copy Markdown
Contributor

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (1)

Grey Divider


Action required

1. CI Gradle version unpinned 🐞 Bug ☼ Reliability
Description
The binaries workflow now runs gradle (including on Windows/macOS), which uses the Gradle version
installed by the repo’s setup action configured as gradle-version: current rather than the version
pinned by gradle/wrapper/gradle-wrapper.properties. This makes the binaries workflow’s build
toolchain version no longer controlled by the repo’s wrapper pin.
Code

.github/workflows/binaries.yml[R382-386]

                "os": "windows-latest",
                "displayName": "windows-amd64",
-                "gradleCommand": "./gradlew",
+                "gradleCommand": "gradle",
                "archivePortable": "7z a -r jabgui/build/packages/windows-latest/JabRef-portable_windows.zip ./jabgui/build/packages/windows-latest/JabRef && rm -R jabgui/build/packages/windows-latest/JabRef",
                "archivePortableJabKit": "7z a -r jabkit/build/packages/windows-latest/jabkit-portable_windows.zip ./jabkit/build/packages/windows-latest/jabkit && rm -R jabkit/build/packages/windows-latest/jabkit",
Evidence
The build job executes ${{ matrix.gradleCommand }} and the matrix entries now set that command to
gradle for Windows/macOS. The repo’s composite setup action installs Gradle using the special
selector current, while the repository wrapper pins a specific Gradle distribution URL (9.5.0), so
CI is no longer tied to the wrapper-pinned version.

.github/workflows/binaries.yml[356-410]
.github/workflows/binaries.yml[572-608]
.github/actions/setup-gradle/action.yml[17-28]
gradle/wrapper/gradle-wrapper.properties[1-4]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
The binaries workflow now invokes `gradle`, but the repo’s `setup-gradle` composite action installs Gradle using `gradle-version: current`, which is not pinned to the repository’s Gradle wrapper version. This reduces CI build reproducibility and can cause CI-only build changes.

### Issue Context
The repository already pins a Gradle version via `gradle/wrapper/gradle-wrapper.properties`. If CI is intended to use a locally installed `gradle` binary (not `./gradlew`), then the installed Gradle version should still be pinned to the wrapper version (or otherwise explicitly pinned).

### Fix Focus Areas
- .github/actions/setup-gradle/action.yml[17-28]
- gradle/wrapper/gradle-wrapper.properties[1-4]
- .github/workflows/binaries.yml[356-410]

### Implementation notes
- Update `.github/actions/setup-gradle/action.yml` to install a pinned Gradle version matching the wrapper (e.g., use a wrapper-derived option if supported, or set an explicit version matching the wrapper’s `distributionUrl`).
- Keep `gradleCommand: gradle` if the goal is to use the CI-installed Gradle, but ensure it’s the pinned version.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

2. Commented-out guidance in CONTRIBUTING.md 📘 Rule violation ⚙ Maintainability
Description
The PR modifies but keeps an HTML commented-out instruction in CONTRIBUTING.md. This violates the
requirement to remove commented-out code/comments in modified areas to keep the repository clean and
readable.
Code

CONTRIBUTING.md[145]

+<!-- In case you do not have time to add a test case, we nevertheless ask you to at least run `./gradlew check` to ensure that your change does not break anything else. -->
Evidence
PR Compliance ID 6 forbids leaving commented-out code/comments in modified areas. The changed line
is still an HTML comment (<!-- ... -->), so the commented-out content remains after the PR change.

AGENTS.md
CONTRIBUTING.md[145-145]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
A modified documentation line remains commented out (HTML comment), which violates the guideline to remove commented-out content in modified areas.

## Issue Context
The PR updated the content inside the HTML comment, so it is in-scope for cleanup.

## Fix Focus Areas
- CONTRIBUTING.md[145-145]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Qodo Logo

Comment on lines 382 to 386
"os": "windows-latest",
"displayName": "windows-amd64",
"gradleCommand": "./gradlew",
"gradleCommand": "gradle",
"archivePortable": "7z a -r jabgui/build/packages/windows-latest/JabRef-portable_windows.zip ./jabgui/build/packages/windows-latest/JabRef && rm -R jabgui/build/packages/windows-latest/JabRef",
"archivePortableJabKit": "7z a -r jabkit/build/packages/windows-latest/jabkit-portable_windows.zip ./jabkit/build/packages/windows-latest/jabkit && rm -R jabkit/build/packages/windows-latest/jabkit",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Action required

1. Ci gradle version unpinned 🐞 Bug ☼ Reliability

The binaries workflow now runs gradle (including on Windows/macOS), which uses the Gradle version
installed by the repo’s setup action configured as gradle-version: current rather than the version
pinned by gradle/wrapper/gradle-wrapper.properties. This makes the binaries workflow’s build
toolchain version no longer controlled by the repo’s wrapper pin.
Agent Prompt
### Issue description
The binaries workflow now invokes `gradle`, but the repo’s `setup-gradle` composite action installs Gradle using `gradle-version: current`, which is not pinned to the repository’s Gradle wrapper version. This reduces CI build reproducibility and can cause CI-only build changes.

### Issue Context
The repository already pins a Gradle version via `gradle/wrapper/gradle-wrapper.properties`. If CI is intended to use a locally installed `gradle` binary (not `./gradlew`), then the installed Gradle version should still be pinned to the wrapper version (or otherwise explicitly pinned).

### Fix Focus Areas
- .github/actions/setup-gradle/action.yml[17-28]
- gradle/wrapper/gradle-wrapper.properties[1-4]
- .github/workflows/binaries.yml[356-410]

### Implementation notes
- Update `.github/actions/setup-gradle/action.yml` to install a pinned Gradle version matching the wrapper (e.g., use a wrapper-derived option if supported, or set an explicit version matching the wrapper’s `distributionUrl`).
- Keep `gradleCommand: gradle` if the goal is to use the CI-installed Gradle, but ensure it’s the pinned version.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

@Siedlerchr Siedlerchr enabled auto-merge May 3, 2026 18:33
@Siedlerchr Siedlerchr added this pull request to the merge queue May 3, 2026
@github-actions github-actions Bot added the status: to-be-merged PRs which are accepted and should go into the merge-queue. label May 3, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 3, 2026
@Siedlerchr Siedlerchr merged commit ee28c2a into main May 3, 2026
53 of 55 checks passed
@Siedlerchr Siedlerchr deleted the refine-gradle branch May 3, 2026 20:03
Siedlerchr added a commit to FynnianB/jabref that referenced this pull request May 4, 2026
…rity

* upstream/main: (204 commits)
  New Crowdin updates (JabRef#15669)
  Fix OpenRewrite (JabRef#15670)
  Udpate heylogs (and fix CHANGELOG.md) (JabRef#15671)
  Improve security and prevent shell injection for push2applications (JabRef#15628)
  Fix depdency analysis (JabRef#15668)
  Always use CI-local "gradle", instead of gradlew (JabRef#15667)
  Change OpenRewrite task to use rewriteDryRun (JabRef#15664)
  Add small documentation to parameter (JabRef#15666)
  Fix markbaseChanged for "imported entries" (JabRef#15610)
  Add forgotten --fresh
  chore(deps): update dependency com.github.ben-manes.caffeine:caffeine to v3.2.4 (JabRef#15662)
  chore(deps): update jackson monorepo to v3.1.3 (JabRef#15659)
  chore(deps): update dependency org.glassfish.hk2:hk2-utils to v4.0.1 (JabRef#15657)
  chore(deps): update dependency org.glassfish.hk2:hk2-locator to v4.0.1 (JabRef#15656)
  fix gemsfx missing icon resolving (JabRef#15655)
  chore(deps): update dependency org.glassfish.hk2:hk2-api to v4.0.1 (JabRef#15654)
  chore(deps): update dependency org.postgresql:postgresql to v42.7.11 (JabRef#15634)
  Chore(deps): Bump tools.jackson:jackson-bom in /versions (JabRef#15653)
  Chore(deps): Bump dev.langchain4j:langchain4j-bom in /versions (JabRef#15652)
  Chore(deps): Bump com.dlsc.gemsfx:gemsfx in /versions (JabRef#15651)
  ...
Siedlerchr added a commit that referenced this pull request May 5, 2026
* upstream/main: (775 commits)
  Chore(deps): Bump com.konghq:unirest-modules-gson in /versions (#15682)
  Chore(deps): Bump org.glassfish.jaxb:jaxb-runtime in /versions (#15681)
  Update dependency com.konghq:unirest-modules-gson to v4.9.0 (#15679)
  Integrate with SearchRxiv  (#15373)
  Fix requirements (#15600)
  refactor: less objects during writing (#15677)
  Fix: suppress WARN for empty or blank column name in MainTableColumnModel#parse() (#15576)
  New Crowdin updates (#15676)
  Chore(deps): Bump com.github.ben-manes.caffeine:caffeine in /versions (#15673)
  Fix Nullwarnings - C (Mark bst package as nonnull by default) (#15663)
  Chore(deps): Bump com.github.javaparser:javaparser-symbol-solver-core (#15674)
  Chore(deps): Bump com.github.javaparser:javaparser-core in /versions (#15672)
  New Crowdin updates (#15669)
  Fix OpenRewrite (#15670)
  Udpate heylogs (and fix CHANGELOG.md) (#15671)
  Improve security and prevent shell injection for push2applications (#15628)
  Fix depdency analysis (#15668)
  Always use CI-local "gradle", instead of gradlew (#15667)
  Change OpenRewrite task to use rewriteDryRun (#15664)
  Add small documentation to parameter (#15666)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dev: ci-cd status: to-be-merged PRs which are accepted and should go into the merge-queue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants