1. 07 Feb, 2024 1 commit
  2. 21 Jan, 2024 1 commit
    • 林洵锋's avatar
      Adjust the position of require File.expand_path (#141521) · f340d207
      林洵锋 authored
      On `Podfile`:
      
      ```ruby
      flutter_application_path = '../flutter_module'
      load File.join(flutter_application_path, '.ios', 'Flutter', 'podhelper.rb')
      
      target 'OCProject' do
        # Comment the next line if you don't want to use dynamic frameworks
        use_frameworks!
      
        # Pods for OCProject
        # install_all_flutter_pods(flutter_application_path)
        # install_flutter_engine_pod(flutter_application_path)
        # install_flutter_application_pod(flutter_application_path)
        install_flutter_plugin_pods(flutter_application_path)
      
      end
      
      post_install do |installer|
        flutter_post_install(installer)
      end
      ```
      Encountering the following error after executing `pod install`:
      
      ```shell
      pod install
      
      [!] Invalid `Podfile` file: undefined method `flutter_relative_path_from_podfile' for #<Pod::Podfile:0x000000010e74c520 @defined_in_file=#<Pathname:/Users/lxf/gitHub/flutter_hybrid_bug/OCProject/Podfile>, @internal_hash={}, @root_target_definitions=[#<Pod::Podfile::TargetDefinition label=Pods>], @current_target_definition=#<Pod::Podfile::TargetDefinition label=Pods>>
      
        relative = flutter_relative_path_from_podfile(export_script_directory)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^.
      
       #  from /Users/lxf/gitHub/flutter_hybrid_bug/OCProject/Podfile:17
       #  -------------------------------------------
       #    # install_flutter_plugin_pods(flutter_application_path)
       >    install_flutter_application_pod(flutter_application_path)
       #
       #  -------------------------------------------
      ```
      
      The `flutter_relative_path_from_podfile` method is in `flutter_tools/bin/podhelper.rb`, but now `flutter_tools/bin/podhelper.rb` is only required in `install_all_flutter_pods` in `podhelper.rb.tmpl`.
      
      Sometimes we only need to use the `install_flutter_plugin_pods` method in podhelper.rb. For example, using `Shorebird` in an iOS hybird app scenario, we need to build `Flutter.xcframework` and `App.xcframework` and embed them into the iOS native project. In order to avoid unnecessary conflicts, use `install_flutter_plugin_pods` method to install Flutter plugin pods.
      
      [Shorebird - Code Push In Hybrid Apps](https://docs.shorebird.dev/guides/hybrid-app/ios)
      
      So I adjust the position of `require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)`.
      f340d207
  3. 16 Jan, 2024 1 commit
  4. 03 Jan, 2024 2 commits
  5. 02 Jan, 2024 2 commits
  6. 16 Nov, 2023 2 commits
  7. 09 Nov, 2023 1 commit
  8. 03 Nov, 2023 1 commit
  9. 02 Nov, 2023 1 commit
  10. 18 Oct, 2023 1 commit
  11. 20 Sep, 2023 1 commit
    • 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
  12. 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
  13. 30 Aug, 2023 2 commits
  14. 31 Jul, 2023 1 commit
  15. 20 Jun, 2023 1 commit
  16. 06 Jun, 2023 1 commit
  17. 23 May, 2023 1 commit
  18. 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
  19. 27 Apr, 2023 1 commit
  20. 13 Jan, 2023 1 commit
  21. 09 Sep, 2022 1 commit
  22. 22 Aug, 2022 1 commit
  23. 12 Aug, 2022 1 commit
  24. 26 Jul, 2022 1 commit
  25. 02 May, 2022 1 commit
  26. 15 Apr, 2022 2 commits
  27. 14 Apr, 2022 1 commit
  28. 13 Apr, 2022 1 commit
    • Callum Moffat's avatar
      Support trackpad gestures in framework (#89944) · 30a50180
      Callum Moffat authored
      * Implement trackpad gestures in framework
      
      * Touch and Pan/Zoom pointers have separate IDs now
      
      * Handle trackpad pointer device type
      
      * Respect supportedDevices for pan/zoom events
      
      * Update after rebase
      
      * Fix check failures
      
      * Avoid error with very short drags
      
      * Address feedback
      
      * Refactor drag event handler
      
      * Address more feedback
      
      * Add some missing punctuation
      30a50180
  29. 07 Apr, 2022 1 commit
  30. 31 Mar, 2022 1 commit
  31. 25 Mar, 2022 1 commit
  32. 22 Mar, 2022 1 commit
  33. 16 Mar, 2022 1 commit
  34. 09 Mar, 2022 1 commit
  35. 28 Feb, 2022 1 commit