flutter/packages/flutter_tools/templates/app_shared
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
..
.idea
android-java.tmpl Refactor Flutter Gradle Plugin so it can be applied using the declarative plugins {} block (#123511) 2023-04-19 17:56:22 +00:00
android-kotlin.tmpl improvement : removed required kotlin dependency (#125002) 2023-05-05 19:47:22 +00:00
android.tmpl Bump gradle heap size limits in templates (#133671) 2023-08-30 15:40:14 +00:00
ios-objc.tmpl Migrate Xcode projects last version checks to Xcode 14.3 (#125827) 2023-05-02 00:06:33 +00:00
ios-swift.tmpl Migrate Xcode projects last version checks to Xcode 14.3 (#125827) 2023-05-02 00:06:33 +00:00
ios.tmpl iOS info.plist template: make UIViewControllerBasedStatusBar to be true (#128970) 2023-06-20 18:11:18 +00:00
linux.tmpl Native assets support for Linux (#134031) 2023-09-18 11:13:37 +00:00
macos.tmpl Migrate Xcode projects last version checks to Xcode 14.3 (#125827) 2023-05-02 00:06:33 +00:00
web flutter-tool, web: update HTML template serviceWorkerVersion to be const (#124826) 2023-04-14 02:01:21 +00:00
windows.tmpl [Windows] Add target architecture to build path (#131843) 2023-08-31 09:09:02 -07:00
.gitignore.tmpl No longer include .packages in created .gitignore files (#133484) 2023-08-30 00:40:01 +00:00
analysis_options.yaml.tmpl Update links to old linter site to dart.dev (#129866) 2023-07-01 18:36:10 +00:00
projectName.iml.tmpl Remove .pub directories from iml templates (#109622) 2022-09-09 22:20:12 +00:00