flutter/packages/flutter_tools/test
Daco Harkes 2337c64d0c
Native assets support for Linux (#134031)
Support for FFI calls with `@Native external` functions through Native assets on Linux. This enables bundling native code without any build-system boilerplate code.

For more info see:

* https://github.com/flutter/flutter/issues/129757

### Implementation details for Linux.

Mainly follows the design of https://github.com/flutter/flutter/pull/130494.

Some differences are:

* Linux does not support cross compiling or compiling for multiple architectures, so this has not been implemented.
* Linux has no add2app.

The assets copying is done in the install-phase of the CMake build of a flutter app.
CMake requires the native assets folder to exist, so we create it also when the feature is disabled or there are no assets.

### Tests

This PR adds new tests to cover the various use cases.

* packages/flutter_tools/test/general.shard/linux/native_assets_test.dart
  * Unit tests the Linux-specific part of building native assets.

It also extends various existing tests:

* packages/flutter_tools/test/integration.shard/native_assets_test.dart
  * Runs (incl hot reload/hot restart), builds, builds frameworks for Linux and flutter-tester.
2023-09-18 11:13:37 +00:00
..
commands.shard Makes scheme and target optional parameter when getting universal lin… (#134571) 2023-09-15 21:01:05 +00:00
data Enable private field promotion for flutter_tools (#134474) 2023-09-12 20:20:04 +00:00
general.shard Native assets support for Linux (#134031) 2023-09-18 11:13:37 +00:00
host_cross_arch.shard Native assets support for MacOS and iOS (#130494) 2023-09-10 08:07:13 +00:00
integration.shard Native assets support for Linux (#134031) 2023-09-18 11:13:37 +00:00
src Enable private field promotion for flutter_tools (#134474) 2023-09-12 20:20:04 +00:00
web.shard Add vmservice for android build options (#123034) 2023-04-18 18:16:09 +00:00