-
Notifications
You must be signed in to change notification settings - Fork 56
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
[native_assets_cli] Move targetOS
to CodeConfig
#1806
Conversation
@@ -188,7 +189,7 @@ class CBuilder extends CTool implements Builder { | |||
name: assetName!, | |||
file: libUri, | |||
linkMode: linkMode, | |||
os: config.targetOS, | |||
os: config.codeConfig.targetOS, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we pass os:
and architecture:
separately. It may? be more idiomatic to pass an Abi
object here instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we go that direction, we should also have config.codeConfig.targetAbi
instead of OS and architecture. But that might make config.codeConfig.android.ndkVersion
less obvious again. Anyway, let's discuss that in a separate issue.
Thanks @mkustermann! |
Next refactoring in:
BuildConfig.targetOS
toBuildConfig.codeConfig.targetOS
, remove it entirely or extend to cover web #1738We move
config.targetOS
toconfig.codeConfig.targetOS
. Other asset types might not get access on the target OS.This will require a manual roll into dartdev and flutter tools due to the targetOS now having to be passed in via
setupCodeConfig
instead of the base config.The native assets builder will still emit the same JSON if code assets are supported. Since both Dart and Flutter support code assets currently, this will not break anything. Once data assets for web in Flutter are added, all existing build hooks that assume code assets are always supported will break.