1. 13 Feb, 2024 2 commits
  2. 12 Feb, 2024 1 commit
  3. 08 Feb, 2024 2 commits
    • 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
    • Jackson Gardner's avatar
      Revert Dual Web Compile changes (#143175) · 2efeeb47
      Jackson Gardner authored
      Dual Web Compile has had some issues where `flutter test` is not respecting the `--web-renderer` flag for some reason. I haven't gotten entirely to the bottom of the issue, but for now we need to rever these changes while I investigate. This reverts the following PRs:
      
      https://github.com/flutter/flutter/pull/143128
      https://github.com/flutter/flutter/pull/141396
      
      While doing this revert, I had a few merge conflicts with https://github.com/flutter/flutter/pull/142760, and I tried to resolve the merge conflicts within the spirit of that PR's change, but @chingjun I might need your input on whether the imports I have modified are okay with regards to the change you were making.
      2efeeb47
  4. 07 Feb, 2024 2 commits
  5. 02 Feb, 2024 2 commits
    • Lau Ching Jun's avatar
      Avoid depending on files from build_system/targets other than from top level... · ac7879e2
      Lau Ching Jun authored
      Avoid depending on files from build_system/targets other than from top level entrypoints in flutter_tools. (#142760)
      
      Add a new `BuildTargets` class that provides commonly used build targets. And avoid importing files from `build_system/targets` except from the top level entrypoints or from top level commands.
      
      Also move `scene_importer.dart` and `shader_compiler.dart` into `build_system/tools` because they are not `Target` classes, but wrapper for certain tools.
      
      With this change, we can ignore all files in `build_system/targets` internally and make PR #142709 easier to land internally. See cl/603434066 for the corresponding internal change.
      
      Related to:
      https://github.com/flutter/flutter/pull/142709
      https://github.com/flutter/flutter/issues/142041
      
      Also note that I have opted to add a new variable in `globals.dart` for `BuildTargets` in this PR, but I know that we are trying to get rid of globals. Several alternatives that I was considering:
      
      1. Add a new field in `BuildSystem` that returns a `BuildTargets` instance. Since `BuildSystem` is already in `globals`, we can access build targets using `globals.buildSystem.buildTargets` without adding a new global variable.
      2. Properly inject the `BuildTargetsImpl` instance from the top level `executable.dart` and top level commands.
      
      Let me know if you want me to do one of the above instead. Thanks!
      ac7879e2
    • Jackson Gardner's avatar
      Wasm/JS Dual Compile with the flutter tool (#141396) · ba626dc8
      Jackson Gardner authored
      This implements dual compile via the newly available flutter.js bootstrapping APIs for intelligent build fallback.
      * Users can now use the `FlutterLoader.load` API from flutter.js
      * Flutter tool injects build info into the `index.html` of the user so that the bootstrapper knows which build variants are available to bootstrap
      * The semantics of the `--wasm` flag for `flutter build web` have changed:
        - Instead of producing a separate `build/web_wasm` directory, the output goes to the `build/web` directory like a normal web build
        - Produces a dual build that contains two build variants: dart2wasm+skwasm and dart2js+CanvasKit. The dart2wasm+skwasm will only work on Chrome in a cross-origin isolated context, all other environments will fall back to dart2js+CanvasKit.
        - `--wasm` and `--web-renderer` are now mutually exclusive. Since there are multiple build variants with `--wasm`, the web renderer cannot be expressed via a single command-line flag. For now, we are hard coding what build variants are produced with the `--wasm` flag, but I plan on making this more customizable in the future.
      * Build targets now can optionally provide a "build key" which can uniquely identify any specific parameterization of that build target. This way, the build target can invalidate itself by changing its build key. This works a bit better than just stuffing everything into the environment defines because (a) it doesn't invalidate the entire build, just the targets which are affected and (b) settings for multiple build variants don't translate well to the flat map of environment defines.
      ba626dc8
  6. 01 Feb, 2024 1 commit
  7. 29 Jan, 2024 1 commit
    • Zachary Anderson's avatar
      Update Android minSdkVersion to 21 (#142267) · 6a6874ec
      Zachary Anderson authored
      This PR increases Android's `minSdkVersion` to 21.
      
      There are two changes in this PR aside from simply increasing the number
      from 19 to 21 everywhere.
      
      First, tests using `flutter_gallery` fail without updating the
      lockfiles. The changes in the PR are the results of running
      `dev/tools/bin/generate_gradle_lockfiles.dart` on that app.
      
      Second, from
      [here](https://developer.android.com/build/multidex#mdex-pre-l):
      > if your minSdkVersion is 21 or higher, multidex is enabled by default
      and you don't need the multidex library.
      
      As a result, the `multidex` option everywhere is obsolete. This PR
      removes all logic and tests related to that option that I could find.
      `Google testing` and `customer_tests` pass on this PR, so it seems like
      this won't be too breaking if it is at all. If needed I'll give this
      some time to bake in the framework before landing the flutter/engine
      PRs.
      
      Context: https://github.com/flutter/flutter/issues/138117,
      https://github.com/flutter/flutter/issues/141277, b/319373605
      6a6874ec
  8. 26 Jan, 2024 2 commits
    • Andrew Kolos's avatar
      Remove duplicate global declaration of `UserMessages` (#142281) · 69c98bd9
      Andrew Kolos authored
      Fixes https://github.com/flutter/flutter/issues/142286
      
      This is a refactor. No code behavior changes should be observed.
      69c98bd9
    • Pierrick Bouvier's avatar
      Enable native compilation for windows-arm64 (#141930) · 37c3978b
      Pierrick Bouvier authored
      It's now possible to natively compile a flutter app for windows-arm64. Cross-compilation is not yet implemented.
      
      Uses arm64 artifacts now available for Dart/Flutter. Platform detection is based on Abi class, provided by Dart. Depending if Dart is an arm64 or x64 binary, the Abi is set accordingly. Initial bootstrap of dart artifacts (update_dart_sdk.ps1) is checking PROCESSOR_ARCHITECTURE environment variable, which is the way to detect host architecture on Windows.
      
      This is available only for master channel (on other channels, it fallbacks to windows-x64).
      
      On windows-x64, it produces an x64 app. On windows-arm64, it produces an arm64 app.
      37c3978b
  9. 23 Jan, 2024 1 commit
  10. 18 Jan, 2024 2 commits
    • auto-submit[bot]'s avatar
      Reverts "Enable native compilation for windows-arm64 " (#141809) · 1901d6fa
      auto-submit[bot] authored
      Reverts flutter/flutter#137618
      Initiated by: Jasguerrero
      This change reverts the following previous change:
      Original Description:
      It's now possible to natively compile a flutter app for
      windows-arm64. Cross-compilation is not yet implemented.
      
      Uses arm64 artifacts now available for Dart/Flutter.
      Platform detection is based on Abi class, provided by Dart. Depending if
      Dart is an arm64 or x64 binary, the Abi is set accordingly.
      Initial bootstrap of dart artifacts (update_dart_sdk.ps1) is checking
      PROCESSOR_ARCHITECTURE environment variable, which is the way to detect
      host architecture on Windows.
      
      This is available only for master channel (on other channels, it
      fallbacks to windows-x64).
      
      On windows-x64, it produces an x64 app. On windows-arm64, it produces an
      arm64 app.
      1901d6fa
    • Pierrick Bouvier's avatar
      Enable native compilation for windows-arm64 (#137618) · 54055920
      Pierrick Bouvier authored
      It's now possible to natively compile a flutter app for
      windows-arm64. Cross-compilation is not yet implemented.
      
      Uses arm64 artifacts now available for Dart/Flutter.
      Platform detection is based on Abi class, provided by Dart. Depending if
      Dart is an arm64 or x64 binary, the Abi is set accordingly.
      Initial bootstrap of dart artifacts (update_dart_sdk.ps1) is checking
      PROCESSOR_ARCHITECTURE environment variable, which is the way to detect
      host architecture on Windows.
      
      This is available only for master channel (on other channels, it
      fallbacks to windows-x64).
      
      On windows-x64, it produces an x64 app. On windows-arm64, it produces an
      arm64 app.
      54055920
  11. 12 Jan, 2024 1 commit
  12. 02 Jan, 2024 1 commit
  13. 07 Dec, 2023 1 commit
  14. 04 Dec, 2023 1 commit
  15. 30 Nov, 2023 1 commit
  16. 29 Nov, 2023 1 commit
  17. 22 Nov, 2023 1 commit
  18. 16 Nov, 2023 1 commit
  19. 10 Nov, 2023 1 commit
    • Elias Yishak's avatar
      `CommandResultEvent` migrated (#138165) · 7a278ae4
      Elias Yishak authored
      Related to tracker issue:
      - https://github.com/flutter/flutter/issues/128251
      
      This event was only called from one file (`flutter_command.dart`). With the previous implementation, we actually sent 2 events, one for the result of the `commandPath` and another containing the `maxRss` value from `ProcessInfo`.
      
      I have consolidated this down to just one event and used a function to safely get the `maxRss` value, or return null when if there was an error getting that integer value
      7a278ae4
  20. 07 Nov, 2023 1 commit
  21. 06 Nov, 2023 1 commit
  22. 19 Oct, 2023 1 commit
  23. 17 Oct, 2023 2 commits
    • Andrew Kolos's avatar
      clean up `--dart-define-from-file` option tests (#135980) · cdc40b52
      Andrew Kolos authored
      Fixes https://github.com/flutter/flutter/issues/134279.
      
      Changes:
      * Moves all tests of `--dart-define-from-file` behavior from `build_bundle_test.dart` and `assemble_test.dart` to `flutter_command_test.dart`.
      * Deletes a duplicate test of malformed JSON detection behavior.
      * Renames the `useDartDefineFromFileOption` method of `FlutterCommand` to `_usesDartDefineFromFileOption`. This 1) makes the name more consistent with the other `uses*Option` methods and 2) hides the method since it is not used outside of the file.
      * Renames several tests to better articulate what is under test and what the expected result is.
      * Adds a test for the case where a `.env` file with a malformed line is provided to `--dart-define-from-file`.
      cdc40b52
    • Aran Donohue's avatar
      Support --web-header option for flutter run (#136297) · 48eee14f
      Aran Donohue authored
      Adds support for a new --web-header option to flutter run.
      
      Creates a workaround for https://github.com/flutter/flutter/issues/127902
      
      This PR allows adding additional headers for the flutter run web server. This is useful to add headers like Cross-Origin-Embedder-Policy and Cross-Origin-Opener-Policy without the use of a proxy server. These headers are required enable advanced web features. This approach provides flexibility to the developer to make use of the feature as they see fit and is backward-compatible. One tradeoff is that it increases the surface area to support for future changes to the flutter web server.
      
      https://github.com/flutter/flutter/issues/127902 is not fully addressed by this change. The solution for that task will be more opinionated. This PR creates a general-purpose workaround for anyone who needs a solution sooner while the bigger solution is developed.
      48eee14f
  24. 28 Sep, 2023 1 commit
  25. 21 Sep, 2023 1 commit
  26. 23 Aug, 2023 1 commit
  27. 04 Aug, 2023 1 commit
  28. 13 Jul, 2023 1 commit
  29. 05 Jul, 2023 1 commit
  30. 16 Jun, 2023 1 commit
  31. 02 Jun, 2023 1 commit
  32. 16 May, 2023 1 commit
  33. 18 Apr, 2023 1 commit
    • Samuel Abada's avatar
      Remove double.fromEnvironment from dart-define doc (#124102) · 81c3bc56
      Samuel Abada authored
      Remove double.fromEnvironment from dart-define doc.
      
      Fixes #124665 
      
      The current dart-define docs reads:
      
      ```
      Additional key-value pairs that will be available as constants from the String.fromEnvironment, bool.fromEnvironment, int.fromEnvironment, and
      double.fromEnvironment constructors.
      ```
      while dart-define-from-file reads:
      
      ```
      The path of a json format file where flutter define a global constant pool. 
      Json entry will be available as constants from the String.fromEnvironment, bool.fromEnvironment, int.fromEnvironment, 
      and double.fromEnvironment constructors; the key and field are json values
      ```
      
      <img width="1440" alt="Screenshot 2023-04-03 at 19 31 34" src="https://user-images.githubusercontent.com/31275429/229720102-2020e1a9-c1fb-470b-89e6-ffb84096a51b.png">
      
      However, there is no fromEnvironment constructor for double. The aim of this PR is to address this by removing double.fromEnvironment from help docs as stated in
      81c3bc56