1. 04 Oct, 2023 1 commit
  2. 27 Sep, 2023 1 commit
  3. 22 Sep, 2023 2 commits
    • Bartek Pacia's avatar
      Refactor "app plugin loader" Gradle Plugin so it can be applied using the... · dbe0ccd8
      Bartek Pacia authored
      Refactor "app plugin loader" Gradle Plugin so it can be applied using the declarative `plugins {}` block (#127897)
      
      This PR fixes #125009.
      dbe0ccd8
    • Daco Harkes's avatar
      Reland "Native assets support for Linux" (#135097) · 2def9519
      Daco Harkes authored
      Reland of #134031. (Reverted in #135069.) Contains the fix for b/301051367 together with cl/567233346.
      
      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.
      2def9519
  4. 20 Sep, 2023 2 commits
    • Camille Simon's avatar
      [Android] Add Java/AGP/Gradle incompatibility warning to `flutter create` (#131444) · 594ff98a
      Camille Simon authored
      Adds warning to `flutter create` command that checks if detected Java version is compatible with the template AGP and template Gradle versions. If a developer is building for Android and their Java version is incompatible with either the AGP or Gradle versions that Flutter currently supports by default for new Flutter projects, then
      
      - a warning will show noting the incompatibility and
      - steps will be shown to fix the issue, the recommended option being to configure a new compatible Java version given that Flutter knows we can support the template Gradle/AGP versions and updating them manually may be risky (feedback on this approach would be greatly appreciated!)
      
      Given that the template AGP and Gradle versions are compatible, this PR assumes that the detected Java version may only conflict with one of the template AGP or Gradle versions because:
       - the minimum Java version for a given AGP version is less than the maximum Java version compatible for the minimum Gradle version required for that AGP version (too low a Java version will fail AGP compatibility test, but not Gradle compatibility).
      - the maximum Java version compatible with minimum Gradle version for a given AGP version is higher than minimum Java version required for that AGP version (too high a Java version will fail Gradle compatibility test, but not AGP compatibility test).
      
      Fixes https://github.com/flutter/flutter/issues/130515 in the sense that `flutter create foo`; `cd foo`; `flutter run` should always be successful.
      594ff98a
    • Xilai Zhang's avatar
      [flutter roll] Revert "Native assets support for Linux" (#135069) · 52ef9d88
      Xilai Zhang authored
      Reverts flutter/flutter#134031
      
      context: b/301051367
      Looked at the error message from the broken TAP target, but seems like the failure might be non trivial to resolve. Would it be okay if we revert this for now while it is being triaged?
      52ef9d88
  5. 18 Sep, 2023 1 commit
    • Daco Harkes's avatar
      Native assets support for Linux (#134031) · 2337c64d
      Daco Harkes authored
      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.
      2337c64d
  6. 14 Sep, 2023 1 commit
  7. 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
  8. 31 Aug, 2023 1 commit
  9. 30 Aug, 2023 2 commits
  10. 09 Aug, 2023 1 commit
    • Victoria Ashworth's avatar
      New tooling for iOS 17 physical devices (#131865) · d631b262
      Victoria Ashworth authored
      This PR includes the following changes. These changes only apply to iOS 17 physical devices.
      
      | Command | Change Description  | Changes to User Experience |
      | ------------- | ------------- | ------------- |
      | `flutter run --release` | Uses `devicectl` to install and launch application in release mode.  | No change.  |
      | `flutter run`  | Uses Xcode via automation scripting to run application in debug and profile mode. | Xcode will be opened in the background. Errors/crashes may be caught in Xcode and therefore may not show in terminal. |
      | `flutter run --use-application-binary=xxxx` | Creates temporary empty Xcode project and use Xcode to run via automation scripting in debug and profile. | Xcode will be opened in the background. Errors/crashes may be caught in Xcode and therefore may not show in terminal.  |
      | `flutter install` | Uses `devicectl` to check installed apps, install app, uninstall app.  | No change.  |
      | `flutter screenshot` | Will return error.  | Will return error.  |
      
      Other changes include:
      * Using `devicectl` to get information about the device
      * Using `idevicesyslog` and Dart VM logging for device logs
      
      Note:
      Xcode automation scripting (used in `flutter run` for debug and profile) does not work in a headless (without a UI) interface. No known workaround.
      
      Fixes https://github.com/flutter/flutter/issues/128827, https://github.com/flutter/flutter/issues/128531.
      d631b262
  11. 31 Jul, 2023 2 commits
  12. 27 Jul, 2023 1 commit
  13. 06 Jul, 2023 1 commit
  14. 01 Jul, 2023 1 commit
  15. 29 Jun, 2023 1 commit
  16. 20 Jun, 2023 1 commit
  17. 06 Jun, 2023 1 commit
  18. 02 Jun, 2023 1 commit
  19. 31 May, 2023 1 commit
  20. 23 May, 2023 1 commit
  21. 19 May, 2023 1 commit
  22. 12 May, 2023 1 commit
  23. 05 May, 2023 1 commit
    • Alberto Azinar's avatar
      improvement : removed required kotlin dependency (#125002) · 4d4b3cf2
      Alberto Azinar authored
      This PR removed the non-necessary required Koltin dependency. This is because the Kotlin Gradle adds the dependency on the standard library automatically. 
      
      Fixes #98212
      
      *If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy]. *
      4d4b3cf2
  24. 02 May, 2023 1 commit
    • Jenn Magder's avatar
      Migrate Xcode projects last version checks to Xcode 14.3 (#125827) · 1861ac47
      Jenn Magder authored
      1. Add iOS and macOS migration to mark "last upgraded" Xcode version to 14.3 to prevent `Update to recommended settings` warning.
      2. Update iOS and macOS templates to same.
      3. Update iOS template to set `BuildIndependentTargetsInParallel` to YES as suggested.  I didn't add a migration for this since it seems like a minor optimization and I don't think it's worth a potentially botched/corrupted migration.
      4. Run all example/integration test project to see migrator work.
      5. Add some missing test projects to the build shard since I noticed they were missing and I had to build those manually outside `SHARD=build_tests`.
      
      Fixes https://github.com/flutter/flutter/issues/125817
      See https://github.com/flutter/flutter/pull/90304 for Xcode 13 example.
      1861ac47
  25. 28 Apr, 2023 1 commit
  26. 27 Apr, 2023 1 commit
  27. 19 Apr, 2023 1 commit
  28. 14 Apr, 2023 1 commit
  29. 06 Apr, 2023 1 commit
  30. 05 Apr, 2023 1 commit
  31. 29 Mar, 2023 1 commit
  32. 28 Mar, 2023 1 commit
  33. 21 Mar, 2023 2 commits
  34. 17 Mar, 2023 2 commits