You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 83da6fb
Browse filesBrowse the repository at this point in the historyBrowse files
[tool] Use flutter pub for packages that depend on jni (flutter#13087)
Updates `pub_utils.dart` to use `flutter pub` instead of `dart pub` when a non-Flutter package (or its example) depends on `jni` in `dependencies` or `dev_dependencies`.
`package:jni` declares a `flutter` constraint in its `pubspec.yaml` `environment` section, which causes `dart pub` (including `dart pub publish`) to fail version solving when `FLUTTER_ROOT` is not set in the environment—even for non-Flutter Dart packages like `pigeon` that only depend on `jni` in `dev_dependencies` and run unit tests with `dart test`. Scoping this check to `pub_utils.dart` ensures `pub` commands use `flutter pub` while `dart-test` continues to use `dart run test`.
If more packages run across this problem, they will need to be added to the list to force the `flutter pub` command.
Fixesflutter#192709
## Pre-Review Checklist
**Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.
[^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
0 commit comments