1. 15 Feb, 2024 2 commits
  2. 13 Feb, 2024 1 commit
  3. 12 Feb, 2024 1 commit
  4. 09 Feb, 2024 1 commit
  5. 08 Feb, 2024 1 commit
    • Gray Mackall's avatar
      [Re-land] Enforce a policy on supported Gradle, Java, AGP, and KGP versions (#143132) · 4b0abc77
      Gray Mackall authored
      Re land of https://github.com/flutter/flutter/pull/142000. 
      Differences:
      1. Fixed the test that was failing in postsubmit. The reason was that the Flutter Gradle Plugin was being applied after KGP in that test, so we couldn't find the KGP version. This caused a log, and the test expects no logs. I moved FGP to after KGP
      2. Added to the logs for when we can't find AGP. Change is from
      >  "Warning: unable to detect project AGP version. Skipping version checking."
      
      to 
      > ~"Warning: unable to detect project AGP version. Skipping version checking. \nThis may be because you have applied the Flutter Gradle Plugin after AGP."~
      
      update: the above is wrong, changed to 
      > "Warning: unable to detect project KGP version. Skipping version checking. \nThis may be because you have applied AGP after the Flutter Gradle Plugin."
      
      3. Added a note to the app-level build.gradle templates that FGP must go last
      > // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugin.
      4b0abc77
  6. 07 Feb, 2024 2 commits
    • Gray Mackall's avatar
      Restore log dumps for gradle OOM crashes, and set a value for `MaxMetaspaceSize` (#143085) · 120a01cc
      Gray Mackall authored
      Re-sets two jvmargs that were getting cleared because we set a value for `-Xmx`. Could help with https://github.com/flutter/flutter/issues/142957. Copied from comment here https://github.com/flutter/flutter/issues/142957:
      >Two random things I ran into while looking into this that might help:
      >
      >1. Gradle has defaults for a couple of the jvmargs, and setting any one of them clears those defaults for the others (bug here https://github.com/gradle/gradle/issues/19750). This can cause the "Gradle daemon to consume more and more native memory until it crashes", though the bug typically has a different associated error. It seems worth it to re-set those defaults.
      >2. There is a property we can set that will give us a heap dump on OOM ([-XX:HeapDumpOnOutOfMemoryError](https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/clopts001.html))
      
      Mostly just a find and replace from `find . -name gradle.properties -exec sed -i '' 's/\-Xmx4G/-Xmx4G\ \-XX:MaxMetaspaceSize=2G\ \-XX:+HeapDumpOnOutOfMemoryError/g' {} \;`, with the templates and the one test that writes from a string replaced by hand. I didn't set a value for `MaxMetaspaceSize` in the template files because I want to make sure this value doesn't cause problems in ci first (changes to the templates are essentially un-revertable for those who `flutter create` while the changes exist).
      120a01cc
    • Chris Bracken's avatar
      [Windows] Fix signed/unsigned int comparison (#142341) · 9f8fe3f0
      Chris Bracken authored
      Previously, we were comparing the signed int `target_length` (returned by WideCharToMultiByte) to a size_t string length, resulting in a signed/unsigned comparison warning as follows:
      
      ```
      windows\runner\utils.cpp(54,43): warning C4018:  '>': signed/unsigned mismatch
      ```
      
      WideCharToMultiByte returns:
      * 0 on error
      * the number of bytes written to the buffer pointed to by its fifth parameter, lpMultiByteStr, on success.
      
      As a result it's safe to store the return value in an unsigned int, which eliminates the warning.
      
      No changes to tests since this is dependent on end-user project settings/modifications and does not trigger a warning with default project settings.
      
      Fixes: https://github.com/flutter/flutter/issues/134227
      9f8fe3f0
  7. 26 Jan, 2024 1 commit
  8. 24 Jan, 2024 1 commit
  9. 23 Jan, 2024 1 commit
  10. 22 Jan, 2024 1 commit
  11. 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
  12. 18 Jan, 2024 1 commit
  13. 17 Jan, 2024 1 commit
    • Daco Harkes's avatar
      Native assets: roll deps (#141684) · f5442bf9
      Daco Harkes authored
      Rolls the packages from https://github.com/dart-lang/native in the native assets implementation.
      
      Most notable we're refactoring `package:native_assets_cli` for `build.dart` use.
      Therefore, all imports to that package for Flutter/Dart should be to the implementation internals that are no longer visible for `build.dart` writers. Hence all the import updates.
      
      No behavior in Flutter apps should change.
      
      This PR also updates the template to use the latests version of `package:native_assets_cli` which no longer exposes all the implementation details.
      f5442bf9
  14. 16 Jan, 2024 4 commits
  15. 12 Jan, 2024 2 commits
  16. 03 Jan, 2024 2 commits
  17. 02 Jan, 2024 2 commits
  18. 27 Nov, 2023 1 commit
  19. 16 Nov, 2023 2 commits
  20. 09 Nov, 2023 1 commit
  21. 03 Nov, 2023 2 commits
  22. 02 Nov, 2023 3 commits
  23. 20 Oct, 2023 1 commit
  24. 18 Oct, 2023 2 commits
  25. 04 Oct, 2023 1 commit
  26. 27 Sep, 2023 1 commit
  27. 22 Sep, 2023 1 commit