Skip to content

[native_assets_builder] user-defines in workspace pubspec #2193

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 11, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -16,11 +16,14 @@ dev_dependencies:
lints: ^5.1.1
test: ^1.25.15

# Note: If pub workspaces are in use, the user-defines must be in the workspace
# pub file. These defines are only in effect if `resolution: workspace` above is
# removed. (The tests copy this project and remove `resolution: workspace`.)
hooks:
user_defines:
user_defines:
user_defines: # package name
user_define_key: user_define_value
user_define_key2:
foo: bar
some_other_package:
some_other_package: # package name
user_define_key3: user_define_value3
10 changes: 10 additions & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -58,3 +58,13 @@ workspace:
- pkgs/native_assets_cli/example/link/app_with_asset_treeshaking
- pkgs/native_assets_cli/example/link/package_with_assets
- pkgs/native_toolchain_c

# Hook user-defines are specified in the pub workspace.
hooks:
user_defines:
user_defines: # package name
user_define_key: user_define_value
user_define_key2:
foo: bar
some_other_package: # package name
user_define_key3: user_define_value3