1. 07 Dec, 2023 1 commit
    • Daco Harkes's avatar
      Native assets support for Android (#135148) · 6ad75553
      Daco Harkes authored
      Support for FFI calls with `@Native external` functions through Native assets on Android. 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 Android.
      
      Mainly follows the design of the previous PRs.
      
      For Android, we detect the compilers inside the NDK inside SDK.
      
      And bundling of the assets is done by the flutter.groovy file.
      
      The `minSdkVersion` is propagated from the flutter.groovy file as well.
      
      The NDK is not part of `flutter doctor`, and users can omit it if no native assets have to be build.
      However, if any native assets must be built, flutter throws a tool exit if the NDK is not installed.
      
      Add 2 app is not part of this PR yet, instead `flutter build aar` will tool exit if there are any native assets.
      6ad75553
  2. 10 Sep, 2023 1 commit
    • Daco Harkes's avatar
      Native assets support for MacOS and iOS (#130494) · aa36db1d
      Daco Harkes authored
      Support for FFI calls with `@Native external` functions through Native assets on MacOS and iOS. 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 MacOS and iOS.
      
      Dylibs are bundled by (1) making them fat binaries if multiple architectures are targeted, (2) code signing these, and (3) copying them to the frameworks folder. These steps are done manual rather than via CocoaPods. CocoaPods would have done the same steps, but (a) needs the dylibs to be there before the `xcodebuild` invocation (we could trick it, by having a minimal dylib in the place and replace it during the build process, that works), and (b) can't deal with having no dylibs to be bundled (we'd have to bundle a dummy dylib or include some dummy C code in the build file).
      
      The dylibs are build as a new target inside flutter assemble, as that is the moment we know what build-mode and architecture to target.
      
      The mapping from asset id to dylib-path is passed in to every kernel compilation path. The interesting case is hot-restart where the initial kernel file is compiled by the "inner" flutter assemble, while after hot restart the "outer" flutter run compiled kernel file is pushed to the device. Both kernel files need to contain the mapping. The "inner" flutter assemble gets its mapping from the NativeAssets target which builds the native assets. The "outer" flutter run get its mapping from a dry-run invocation. Since this hot restart can be used for multiple target devices (`flutter run -d all`) it contains the mapping for all known targets.
      
      ### Example vs template
      
      The PR includes a new template that uses the new native assets in a package and has an app importing that. Separate discussion in: https://github.com/flutter/flutter/issues/131209.
      
      ### Tests
      
      This PR adds new tests to cover the various use cases.
      
      * dev/devicelab/bin/tasks/native_assets_ios.dart
        * Runs an example app with native assets in all build modes, doing hot reload and hot restart in debug mode.
      * dev/devicelab/bin/tasks/native_assets_ios_simulator.dart
        * Runs an example app with native assets, doing hot reload and hot restart.
      * packages/flutter_tools/test/integration.shard/native_assets_test.dart
        * Runs (incl hot reload/hot restart), builds, builds frameworks for iOS, MacOS and flutter-tester.
      * packages/flutter_tools/test/general.shard/build_system/targets/native_assets_test.dart
        * Unit tests the new Target in the backend.
      * packages/flutter_tools/test/general.shard/ios/native_assets_test.dart
      * packages/flutter_tools/test/general.shard/macos/native_assets_test.dart
        * Unit tests the native assets being packaged on a iOS/MacOS build.
      
      It also extends various existing tests:
      
      * dev/devicelab/bin/tasks/module_test_ios.dart
         * Exercises the add2app scenario.
      * packages/flutter_tools/test/general.shard/features_test.dart
         * Unit test the new feature flag.
      aa36db1d
  3. 26 Aug, 2022 1 commit
  4. 13 Jul, 2021 1 commit
  5. 12 Jul, 2021 2 commits
  6. 07 Jun, 2021 1 commit
  7. 05 Jun, 2021 1 commit
  8. 21 Apr, 2021 1 commit
  9. 16 Sep, 2020 1 commit
  10. 27 Nov, 2019 1 commit
    • Ian Hickson's avatar
      License update (#45373) · 449f4a66
      Ian Hickson authored
      * Update project.pbxproj files to say Flutter rather than Chromium
      
      Also, the templates now have an empty organization so that we don't cause people to give their apps a Flutter copyright.
      
      * Update the copyright notice checker to require a standard notice on all files
      
      * Update copyrights on Dart files. (This was a mechanical commit.)
      
      * Fix weird license headers on Dart files that deviate from our conventions; relicense Shrine.
      
      Some were already marked "The Flutter Authors", not clear why. Their
      dates have been normalized. Some were missing the blank line after the
      license. Some were randomly different in trivial ways for no apparent
      reason (e.g. missing the trailing period).
      
      * Clean up the copyrights in non-Dart files. (Manual edits.)
      
      Also, make sure templates don't have copyrights.
      
      * Fix some more ORGANIZATIONNAMEs
      449f4a66
  11. 02 Oct, 2019 2 commits
  12. 01 Oct, 2019 1 commit
  13. 29 Sep, 2019 2 commits
  14. 28 Sep, 2019 1 commit
  15. 26 Sep, 2019 2 commits
  16. 16 Sep, 2019 2 commits
  17. 20 Aug, 2019 1 commit
  18. 25 Jun, 2019 1 commit
    • Jim Graham's avatar
      Add test case for Flutter Issue #27677 as a benchmark. (#34870) · f83fd9d4
      Jim Graham authored
      * Add test case for Flutter Issue #27677 as a benchmark.
      
      See https://github.com/flutter/flutter/issues/27677
      
      I got the following results running the test on a Moto E2 which
      will help us determine how much we can gain by analyzing the
      operations and eliminating unnecessary repaints based on
      dirty rectangles/regions.
      
      no blurs       - avg 216.0 fps over 3 samples
      blur the group - avg  22.9 fps over 3 samples
      blur each txt  - avg   3.4 fps over 3 samples
      
      * Added the new benchmark to be tracked on the dashboard.
      f83fd9d4
  19. 27 Feb, 2019 1 commit
  20. 18 Dec, 2018 1 commit
  21. 04 Oct, 2018 1 commit
  22. 16 Jun, 2018 1 commit
  23. 16 May, 2018 1 commit
  24. 23 Mar, 2017 1 commit
  25. 20 Mar, 2017 1 commit
  26. 02 Dec, 2016 1 commit
  27. 29 Sep, 2016 1 commit
  28. 14 Sep, 2016 1 commit