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
Flutter has a way for describing what OSes an app/plugin runs on via the pubspec and what minimal SDK version and architecture an app/plugin runs from via the native build files (Gradle, XCodeBuild, etc.)
Dart standalone has nothing to express this.
The current prototype of native assets in Flutter ties into what the native build systems provide, and the current prototype for Dart standalone completely ignores native version constraints.
We should provide a way express SDK version, OS, and architecture constraints (other than failing the build hook when invoked).
Then we can check these in the same way Flutter does: The minimum SDK version of the app should be at least as high as the lowest SDK version of all packages.
Moreover, we can then check if the architecture and OS is supported even before invoking the build hook.
Could be used for existing plugins, not only native assets.
Cons:
Could get out of sync with the build hook if native assets are used.
2. Let the hook report it
Pros:
Most hook implementations would use one helper to both report the supported archs as well as produce the native code assets.
Cons:
Requires invoking a script (in a sandbox) in order to get the info.
Does not work for existing Flutter plugins.
Related notes on specifying external versions (SDK versions, but also versions such as Java version) in internal doc: go/native-assets-external-versions
Having a Flutter-agnostic way would create duplication with what Flutter already does in native build files, so we'd want to try to get the versions and architectures in the native build files read from the pubspec/hooks. flutter/flutter#154425 (comment)
Any options I'm missing? Have you seen patterns of how to deal with external versions (OS API version, etc.) @mkustermann@mraleph?
The text was updated successfully, but these errors were encountered:
Flutter has a way for describing what OSes an app/plugin runs on via the pubspec and what minimal SDK version and architecture an app/plugin runs from via the native build files (Gradle, XCodeBuild, etc.)
Dart standalone has nothing to express this.
The current prototype of native assets in Flutter ties into what the native build systems provide, and the current prototype for Dart standalone completely ignores native version constraints.
We should provide a way express SDK version, OS, and architecture constraints (other than failing the build hook when invoked).
I believe we have two main directions we could go in here.
1. List in the pubspec
Pros:
Cons:
2. Let the hook report it
Pros:
Cons:
Related notes on specifying external versions (SDK versions, but also versions such as Java version) in internal doc: go/native-assets-external-versions
Having a Flutter-agnostic way would create duplication with what Flutter already does in native build files, so we'd want to try to get the versions and architectures in the native build files read from the pubspec/hooks. flutter/flutter#154425 (comment)
Any options I'm missing? Have you seen patterns of how to deal with external versions (OS API version, etc.) @mkustermann @mraleph?
The text was updated successfully, but these errors were encountered: