Skip to content

ADFA-3857: fix update-libs.sh gradlew fallback for wrapper-less plugins#46

Merged
hal-eisen-adfa merged 1 commit into
mainfrom
ADFA-3857-fix-gradlew
Jul 15, 2026
Merged

ADFA-3857: fix update-libs.sh gradlew fallback for wrapper-less plugins#46
hal-eisen-adfa merged 1 commit into
mainfrom
ADFA-3857-fix-gradlew

Conversation

@hal-eisen-adfa

Copy link
Copy Markdown
Contributor

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

  • `../gradlew assemblePlugin` from within `flutter-template/` builds `fluttertemplate.cgp` ✅
  • Wrapper-selection dry-run: `flutter-template → repo-root gradlew`, `random-xkcd → ./gradlew` (local wrapper still used) ✅
  • `bash -n scripts/update-libs.sh` clean ✅

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

@claude claude 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.

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.

@hal-eisen-adfa
hal-eisen-adfa merged commit 4b4dbc5 into main Jul 15, 2026
2 checks passed
@hal-eisen-adfa
hal-eisen-adfa deleted the ADFA-3857-fix-gradlew branch July 15, 2026 22:56
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