Developers might want to build native code against flutter.h.
To prevent version skew between the package and the Flutter SDK, from-source build should use flutter.h from Flutter itself.
We should provide a path to it in the build config. Something along the lines of
config
.code
.flutter
.cApi
.headerPath
.version
(Should flutter-specific code-specific config live under config.flutter.code or config.code.flutter?)
This is analogous to:
To support prebuilt binaries, the version should be taken into account.
Note that this doesn't solve version skew between generated dart:ffi bindings with FFIgen on a flutter.h and then flutter.h getting a breaking change. This could theoretically be solved by providing access to version in Dart (for example via passing in version as a define in a C lib and compiling it in and accessing it via an FFI call, or by writing the version to a data asset and accessing it at runtime), and then branching between two sets of generated bindings. (This is a similar issue to #1589.)
Developers might want to build native code against
flutter.h.To prevent version skew between the package and the Flutter SDK, from-source build should use
flutter.hfrom Flutter itself.We should provide a path to it in the build config. Something along the lines of
config .code .flutter .cApi .headerPath .version(Should flutter-specific code-specific config live under
config.flutter.codeorconfig.code.flutter?)This is analogous to:
To support prebuilt binaries, the
versionshould be taken into account.Note that this doesn't solve version skew between generated
dart:ffibindings with FFIgen on aflutter.hand thenflutter.hgetting a breaking change. This could theoretically be solved by providing access toversionin Dart (for example via passing inversionas a define in a C lib and compiling it in and accessing it via an FFI call, or by writing the version to a data asset and accessing it at runtime), and then branching between two sets of generated bindings. (This is a similar issue to #1589.)