Skip to content

[native_assets_cli] JSON protocol nest per asset type #993

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

Closed
Tracked by #992
dcharkes opened this issue Mar 12, 2024 · 0 comments · Fixed by #1872
Closed
Tracked by #992

[native_assets_cli] JSON protocol nest per asset type #993

dcharkes opened this issue Mar 12, 2024 · 0 comments · Fixed by #1872
Assignees
Labels
P4 A feature or bug we're unlikely to address package:hooks_runner package:hooks

Comments

@dcharkes
Copy link
Collaborator

dcharkes commented Mar 12, 2024

In the JSON protocol nest the config only for native code assets under the native key.

Pro:

  • Not every asset type or builder will need access to all information. E.g. a data asset probably doesn't need access to the the target architecture or minimum iOS SDK.

Con:

  • Fields needed for multiple asset types (but not asset types) would be duplicated. E.g. the targetOS might be used for some asset types e.g. different icons on iOS vs Android. It would need to be duplicated in the nested keys.

In the JSON protocol nest the native code assets under a native key, nest the data assets under a data key.

Pro:

  • Different asset types do not need to share any structure. E.g. a jar doesn't need an assetId, because it will be never accessed from Dart code. (Note that this is kind of a non-argument as long as we have a type field for assets, because it makes it like a tagged union.)

Sister issue for the API:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P4 A feature or bug we're unlikely to address package:hooks_runner package:hooks
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant