ADFA-3857: fix update-libs.sh gradlew fallback for wrapper-less plugins#46
Merged
Conversation
… wrapper The Build plugin artifacts / Update libs workflows failed on flutter-template with './gradlew: No such file or directory' (exit 127). flutter-template follows the newer convention of using the repo-root Gradle wrapper and ships no per-plugin gradlew, but the build loop in update-libs.sh assumed every plugin bundles its own. Select the wrapper per-plugin: use ./gradlew when present, else the repo-root gradlew.
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.
Tip: disable this comment in your organization's Code Review settings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What went wrong
The Build plugin artifacts run (manual dispatch, `plugin: flutter-template`) failed:
```
→ flutter-template
./scripts/update-libs.sh: line 178: ./gradlew: No such file or directory
##[error]Process completed with exit code 127.
```
The libs refresh and both CoGo builds succeeded — the failure is only in the plugin build loop. `scripts/update-libs.sh` `cd`s into each plugin and runs `./gradlew`, but `flutter-template/` ships no per-plugin wrapper — it's the one plugin already migrated to the CLAUDE.md convention of using the repo-root Gradle wrapper (`cd && ../gradlew assemblePlugin`). So `./gradlew` is missing and bash exits 127.
Fix
Select the wrapper per-plugin in the build loop: use the plugin's `./gradlew` when present and executable, otherwise fall back to the repo-root `$REPO_ROOT/gradlew`. Running the root wrapper from inside the plugin dir builds the correct project (Gradle resolves it from the CWD's `settings.gradle.kts`).
No other spot needs changing: the CodeOnTheGo-checkout gradlew calls (lines 85/91/98) already use that checkout's own wrapper, and `build-plugins.yml` / `update-libs.yml` both invoke this script.
Verification