Skip to content

Commit 817047e

Browse files
rajbosCopilot
andcommitted
fix: drop regeneration step - JAR validation is sufficient
The regeneration step runs './gradlew wrapper --no-daemon' which requires the full project configuration. The IntelliJ Platform Plugin 2.16.0 used in build.gradle.kts requires Gradle >= 9.0.0, but the wrapper on main is 8.10.2, so the step always fails before the project can be upgraded. The gradle/actions/wrapper-validation step already validates the JAR checksum against the official Gradle distribution checksums, which is the security-critical check. The gradlew/gradlew.bat scripts are plain text, visible in PR diffs, and carry no security risk from being 'out of sync'. Keeping the workflow minimal: harden runner + checkout + JAR validation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 7a03dc3 commit 817047e

1 file changed

Lines changed: 1 addition & 37 deletions

File tree

.github/workflows/validate-gradle-wrapper.yml

Lines changed: 1 addition & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ on:
1515
- 'jetbrains-plugin/gradle/wrapper/**'
1616

1717
permissions:
18-
contents: write
18+
contents: read
1919

2020
jobs:
2121
validate-gradle-wrapper:
@@ -29,44 +29,8 @@ jobs:
2929

3030
- name: Checkout code
3131
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
32-
with:
33-
ref: ${{ github.event.pull_request.head.ref || github.ref_name }}
3432

3533
- name: Validate Gradle wrapper JAR
3634
uses: gradle/actions/wrapper-validation@06832c7b30a0129d7fb559bcc6e43d26f6374244 # v4.3.1
3735
with:
3836
min-wrapper-count: 1
39-
40-
- name: Set up Java 21 (Temurin)
41-
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
42-
with:
43-
java-version: '21'
44-
distribution: 'temurin'
45-
46-
- name: Setup Gradle
47-
uses: gradle/actions/setup-gradle@06832c7b30a0129d7fb559bcc6e43d26f6374244 # v4.3.1
48-
49-
- name: Regenerate wrapper files
50-
working-directory: jetbrains-plugin
51-
run: ./gradlew wrapper --no-daemon
52-
53-
- name: Confirm wrapper files are in sync
54-
run: |
55-
if git diff --quiet -- jetbrains-plugin/gradlew jetbrains-plugin/gradlew.bat jetbrains-plugin/gradle/wrapper/gradle-wrapper.jar jetbrains-plugin/gradle/wrapper/gradle-wrapper.properties; then
56-
echo "Gradle wrapper files are in sync."
57-
exit 0
58-
fi
59-
60-
if [ "${{ github.event_name }}" = "pull_request" ]; then
61-
echo "Gradle wrapper files are out of sync. Auto-committing updates to PR branch..."
62-
git config user.name "github-actions[bot]"
63-
git config user.email "github-actions[bot]@users.noreply.github.com"
64-
git add jetbrains-plugin/gradlew jetbrains-plugin/gradlew.bat jetbrains-plugin/gradle/wrapper/gradle-wrapper.jar jetbrains-plugin/gradle/wrapper/gradle-wrapper.properties
65-
git commit -m "chore: sync gradle wrapper files after version bump"
66-
git push
67-
else
68-
echo "Gradle wrapper files are out of sync."
69-
echo "Run './gradlew wrapper --no-daemon' from jetbrains-plugin and commit the updated wrapper files."
70-
git --no-pager diff --stat -- jetbrains-plugin/gradlew jetbrains-plugin/gradlew.bat jetbrains-plugin/gradle/wrapper/gradle-wrapper.jar jetbrains-plugin/gradle/wrapper/gradle-wrapper.properties
71-
exit 1
72-
fi

0 commit comments

Comments
 (0)