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
Bug: #39
Note passing in the user-defines should be done by the Dart and Flutter SDK, they need to decide where to take the command-line arguments, and how to read from the `pubspec.yaml`.
The `NativeAssetsBuildRunner` provides a suggestion about where to put user-defines in the `pubspec.yaml`:
```yaml
hooks:
user_defines:
my_package:
user_define_key: user_define_value
user_define_key2:
foo: bar
some_other_package:
user_define_key3: user_define_value3
```
Moreover, it provides a helper function that can be reused in SDKs after the pubspec yaml is parsed.
### Design choices
(According to the discussion on the bug.)
* User-defines are name-spaced per package, we don't want new user-defines to invalidate the cache for other packages.
* User-defines can be provided for any package in the dependency graph.
* If user-defines need to be shared across packages, the common dependency package can export it as metadata.
### Test
This change is tested by invoking the build with user-defines, and in the hook failing if the defines are not available.
0 commit comments