Skip to content

fix(ci): run only gradlew build for the Gradle plugin - #2474

Merged
blakeli0 merged 2 commits into
masterfrom
ci/remove-publish-to-maven-local
Oct 21, 2026
Merged

blakeli0 merged 2 commits into
masterfrom
ci/remove-publish-to-maven-local

Conversation

@hj690

@hj690 hj690 commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

This PR changes ./gradlew build publishToMavenLocal to ./gradlew build in the 3 CI scripts that build the Gradle plugin. It fixes the units (8) and units (11) failures on Release Please PRs, such as #2473.

Problem

The units (8) job on #2473 fails with this error:

Task 'publishToMavenLocal' not found in root project 'linkage-checker-gradle-plugin'.

Why it is safe to remove publishToMavenLocal

publishToMavenLocal only copies the plugin into the CI machine's ~/.m2. Nothing in CI reads it from there. The Gradle step is the last step, the functional tests load the plugin with TestKit withPluginClasspath(), and the release publishes with publishPlugins, not maven-publish. Removing the task loses no test coverage. It also fixes CI on Release Please PRs, where the version has no -SNAPSHOT suffix and the task does not exist.

Zizmor fixes in ci.yaml

The GitHub Actions Scan runs zizmor on PRs that change workflow files. This PR changes ci.yaml, so the scan found existing problems in that file. So I also fixed them:

  • unpinned-uses: Pin actions/checkout (v4.4.0), actions/setup-java (v1.4.5), and actions/cache (v4.3.0) to commit SHAs. The versions do not change.
  • artipacked: Set persist-credentials: false on actions/checkout. No step uses git credentials after checkout.
  • excessive-permissions: Set top-level permissions: contents: read. The job only reads the repository.

hj690 added 2 commits October 21, 2026 14:39
Release Please PRs (e.g. #2473) change the plugin version to a non-SNAPSHOT
value. build.gradle applies maven-publish only for SNAPSHOT versions, so
the publishToMavenLocal task does not exist and CI fails. Nothing in CI uses
the artifact that publishToMavenLocal installs.
The GitHub Actions Scan runs zizmor on PRs that change workflow files.
- Pin actions/checkout, actions/setup-java, and actions/cache to commit
  SHAs (mandatory unpinned-uses check).
- Set persist-credentials: false on checkout (artipacked).
- Set top-level permissions to contents: read (excessive-permissions).
@hj690 hj690 changed the title ci: run only gradlew build for the Gradle plugin fix(ci): run only gradlew build for the Gradle plugin Oct 21, 2026
@hj690
hj690 requested a review from lqiu96 October 21, 2026 19:14
@hj690
hj690 marked this pull request as ready for review October 21, 2026 19:14
@blakeli0
blakeli0 merged commit 549ae08 into master Oct 21, 2026
12 checks passed
@blakeli0
blakeli0 deleted the ci/remove-publish-to-maven-local branch October 21, 2026 19:37
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.

2 participants