- 08 Feb, 2024 6 commits
-
-
Gustl22 authored
See [#142498](https://github.com/flutter/flutter/pull/142498#discussion_r1478602032) See this discussion: https://discord.com/channels/608014603317936148/1186378330178601000
-
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.
-
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.
-
Zachary Anderson authored
This PR will likely not help with the issue on our CI discussed in https://github.com/flutter/flutter/issues/142637, but will do one retry for our users if they hit the same issue.
-
Daco Harkes authored
Reland of https://github.com/flutter/flutter/pull/142709. The revert of the revert is in the first commit, the fix in the commit on top. The move of the fakes for packages/flutter_tools/test/general.shard/resident_runner_test.dart was erroneous before, as it was trying to use setters instead of a private field. This PR changes the private `_devFS` field in the fake to be a public `fakeDevFS` in line with other fakes. ## Original PR description Native assets in other build systems are not built with `package:native_assets_builder` invoking `build.dart` scripts. Instead all packages have their own blaze rules. Therefore we'd like to not depend on `package:native_assets_builder` from flutter tools in g3 at all. This PR aims to move the imports of `native_assets_builder` and `native_assets_cli` into the `isolated/` directory and into the files with a `main` function that are not used in with other build systems. In order to be able to remove all imports in files used by other build systems, two new interfaces are added `HotRunnerNativeAssetsBuilder` and `TestCompilerNativeAssetsBuilder`. New parameters are then piped all the way through from the entry points: * bin/fuchsia_tester.dart * lib/executable.dart The build_system/targets dir is already excluded in other build systems. So, after this PR only the two above files and build_system/targets import from `isolated/native_assets/` and only `isolated/native_assets/` import `package:native_assets_cli` and `package:native_assets_builder`. Context: * https://github.com/flutter/flutter/issues/142041
-
Jackson Gardner authored
We need to pass along the web renderer in the debugging options to make sure that the resident web runner sets up the targets correctly.
-
- 07 Feb, 2024 10 commits
-
-
auto-submit[bot] authored
Reverts flutter/flutter#128236 Initiated by: vashworth Reason for reverting: Causing `Mac_pixel_7pro run_release_test` and `Mac_arm64_android run_release_test` to fail: https://ci.chromium.org/ui/p/flutter/builders/prod/Mac_pixel_7pro%20run_release_test/547/overview https://ci.chromium.org/ui/p/flutter/builders/prod/Mac_arm64_android%20run_release_test/10516/overview Original PR Author: guidezpl Reviewed By: {christopherfujino, loic-sharma} This change reverts the following previous change: Original Description: Improves the build output: 1. Gives confirmation that the build succeeded, in green 1. Gives the path to the built executable, without a trailing period to make it slightly easier to cmd/ctrl+open 1. Gives the size of the built executable (when the built executable is self contained) ### `apk`, `appbundle` <img width="607" alt="image" src="https://github.com/flutter/flutter/assets/6655696/ecc52abe-cd2e-4116-b22a-8385ae3e980d"> <img width="634" alt="image" src="https://github.com/flutter/flutter/assets/6655696/8af8bd33-c0bd-4215-9a06-9652ee019436"> ### `macos`, `ios`, `ipa` Build executables are self-contained and use a newly introduced `OperatingSystemUtils.getDirectorySize`. <img width="514" alt="image" src="https://github.com/flutter/flutter/assets/6655696/b5918a69-3959-4417-9205-4f501d185257"> <img width="581" alt="image" src="https://github.com/flutter/flutter/assets/6655696/d72fd420-18cf-4470-9e4b-b6ac10fbcd50"> <img width="616" alt="image" src="https://github.com/flutter/flutter/assets/6655696/5f235ce1-252a-4c13-898f-139f6c7bc698"> ### `windows`, `linux`, and `web` Build executables aren't self-contained, and folder size can sometimes overestimate distribution size, therefore their size isn't mentioned (see discussion below). <img width="647" alt="image" src="https://github.com/flutter/flutter/assets/6655696/7179e771-1eb7-48f6-b770-975bc073437b"> <img width="658" alt="image" src="https://github.com/flutter/flutter/assets/6655696/a6801cab-7b5a-4975-a406-f4c9fa44d7a2"> <img width="608" alt="image" src="https://github.com/flutter/flutter/assets/6655696/ee7c4125-a273-4a65-95d7-ab441edf8ac5"> ### Size reporting When applicable, the printed size matches the OS reported size. - macOS <img width="391" alt="image" src="https://github.com/flutter/flutter/assets/6655696/881cbfb1-d355-444b-ab44-c1a6343190ce"> - Windows <img width="338" alt="image" src="https://github.com/flutter/flutter/assets/6655696/3b806def-3d15-48a9-8a25-df200d6feef7"> - Linux <img width="320" alt="image" src="https://github.com/flutter/flutter/assets/6655696/89a4aa3d-2148-4f3b-b231-f93a057fee2b"> ## Related issues Part of #120127 Fixes https://github.com/flutter/flutter/issues/121401
-
Pierre-Louis authored
Improves the build output: 1. Gives confirmation that the build succeeded, in green 1. Gives the path to the built executable, without a trailing period to make it slightly easier to cmd/ctrl+open 1. Gives the size of the built executable (when the built executable is self contained) ### `apk`, `appbundle` <img width="607" alt="image" src="https://github.com/flutter/flutter/assets/6655696/ecc52abe-cd2e-4116-b22a-8385ae3e980d"> <img width="634" alt="image" src="https://github.com/flutter/flutter/assets/6655696/8af8bd33-c0bd-4215-9a06-9652ee019436"> ### `macos`, `ios`, `ipa` Build executables are self-contained and use a newly introduced `OperatingSystemUtils.getDirectorySize`. <img width="514" alt="image" src="https://github.com/flutter/flutter/assets/6655696/b5918a69-3959-4417-9205-4f501d185257"> <img width="581" alt="image" src="https://github.com/flutter/flutter/assets/6655696/d72fd420-18cf-4470-9e4b-b6ac10fbcd50"> <img width="616" alt="image" src="https://github.com/flutter/flutter/assets/6655696/5f235ce1-252a-4c13-898f-139f6c7bc698"> ### `windows`, `linux`, and `web` Build executables aren't self-contained, and folder size can sometimes overestimate distribution size, therefore their size isn't mentioned (see discussion below). <img width="647" alt="image" src="https://github.com/flutter/flutter/assets/6655696/7179e771-1eb7-48f6-b770-975bc073437b"> <img width="658" alt="image" src="https://github.com/flutter/flutter/assets/6655696/a6801cab-7b5a-4975-a406-f4c9fa44d7a2"> <img width="608" alt="image" src="https://github.com/flutter/flutter/assets/6655696/ee7c4125-a273-4a65-95d7-ab441edf8ac5"> ### Size reporting When applicable, the printed size matches the OS reported size. - macOS <img width="391" alt="image" src="https://github.com/flutter/flutter/assets/6655696/881cbfb1-d355-444b-ab44-c1a6343190ce"> - Windows <img width="338" alt="image" src="https://github.com/flutter/flutter/assets/6655696/3b806def-3d15-48a9-8a25-df200d6feef7"> - Linux <img width="320" alt="image" src="https://github.com/flutter/flutter/assets/6655696/89a4aa3d-2148-4f3b-b231-f93a057fee2b"> ## Related issues Part of #120127 Fixes https://github.com/flutter/flutter/issues/121401
-
auto-submit[bot] authored
Reverts flutter/flutter#142000 Initiated by: vashworth Reason for reverting: Causing `Mac_pixel_7pro run_release_test` and `Mac_arm64_android run_debug_test_android` to fail: https://ci.chromium.org/ui/p/flutter/builders/prod/Mac_pixel_7pro%20run_release_test/539/overview https://ci.chromium.org/ui/p/flutter/builders/prod/Mac_arm64_android%20run_debug_test_android/6682/overview Original PR Author: gmackall Reviewed By: {reidbaker, camsim99, bartekpacia} This change reverts the following previous change: Original Description: Policy per https://flutter.dev/go/android-dependency-versions. https://github.com/flutter/flutter/issues/140913 ~Still a WIP while I clean up some error handling, remove some prints, and figure out a Java test (more difficult than the others because I believe we can only install one java version per ci shard).~ ~Also it looks like there are errors that I need to fix when this checking is applied to a project that uses the old way of applying AGP/KGP using the top-level `build.gradle` file (instead of the new template way of applying them in the `settings.gradle` file).~ Done, this is why [these lines exist](https://github.com/flutter/flutter/blob/9af6bae6b9a8d7a8a363467b834f52bfc64c9336/packages/flutter_tools/gradle/src/main/groovy/flutter.groovy#L72-L88) in `flutter.groovy`. They just needed to be added
-
Gray Mackall authored
Policy per https://flutter.dev/go/android-dependency-versions. https://github.com/flutter/flutter/issues/140913 ~Still a WIP while I clean up some error handling, remove some prints, and figure out a Java test (more difficult than the others because I believe we can only install one java version per ci shard).~ ~Also it looks like there are errors that I need to fix when this checking is applied to a project that uses the old way of applying AGP/KGP using the top-level `build.gradle` file (instead of the new template way of applying them in the `settings.gradle` file).~ Done, this is why [these lines exist](https://github.com/flutter/flutter/blob/9af6bae6b9a8d7a8a363467b834f52bfc64c9336/packages/flutter_tools/gradle/src/main/groovy/flutter.groovy#L72-L88) in `flutter.groovy`. They just needed to be added
-
Jackson Gardner authored
Since `WebReleaseBundle` is responsible for copying over the outputs from the subtargets, so it needs to be reflected in inputs and outputs so that things will be recopied when something changes.
-
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).
-
Andrew Kolos authored
Resolves #143041
-
Jason Simmons authored
Dart pub now expects that file to be present in a Flutter SDK (see https://dart.googlesource.com/pub/+/dce232ec195df802a730eb3a66163e28d2ec6444)
-
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
-
auto-submit[bot] authored
Reverts flutter/flutter#142709 Initiated by: vashworth Reason for reverting: `Mac tool_tests_general` started failing on this commit: https://ci.chromium.org/ui/p/flutter/builders/prod/Mac%20tool_tests_general/15552/overview Original PR Author: dcharkes Reviewed By: {christopherfujino, chingjun, reidbaker} This change reverts the following previous change: Original Description: Native assets in other build systems are not built with `package:native_assets_builder` invoking `build.dart` scripts. Instead all packages have their own blaze rules. Therefore we'd like to not depend on `package:native_assets_builder` from flutter tools in g3 at all. This PR aims to move the imports of `native_assets_builder` and `native_assets_cli` into the `isolated/` directory and into the files with a `main` function that are not used in with other build systems. In order to be able to remove all imports in files used by other build systems, two new interfaces are added `HotRunnerNativeAssetsBuilder` and `TestCompilerNativeAssetsBuilder`. New parameters are then piped all the way through from the entry points: * bin/fuchsia_tester.dart * lib/executable.dart The build_system/targets dir is already excluded in other build systems. So, after this PR only the two above files and build_system/targets import from `isolated/native_assets/` and only `isolated/native_assets/` import `package:native_assets_cli` and `package:native_assets_builder`. Context: * https://github.com/flutter/flutter/issues/142041
-
- 06 Feb, 2024 1 commit
-
-
Daco Harkes authored
Native assets in other build systems are not built with `package:native_assets_builder` invoking `build.dart` scripts. Instead all packages have their own blaze rules. Therefore we'd like to not depend on `package:native_assets_builder` from flutter tools in g3 at all. This PR aims to move the imports of `native_assets_builder` and `native_assets_cli` into the `isolated/` directory and into the files with a `main` function that are not used in with other build systems. In order to be able to remove all imports in files used by other build systems, two new interfaces are added `HotRunnerNativeAssetsBuilder` and `TestCompilerNativeAssetsBuilder`. New parameters are then piped all the way through from the entry points: * bin/fuchsia_tester.dart * lib/executable.dart The build_system/targets dir is already excluded in other build systems. So, after this PR only the two above files and build_system/targets import from `isolated/native_assets/` and only `isolated/native_assets/` import `package:native_assets_cli` and `package:native_assets_builder`. Context: * https://github.com/flutter/flutter/issues/142041
-
- 05 Feb, 2024 2 commits
-
-
Ann Marie Mossman authored
Addresses: https://github.com/flutter/flutter/issues/141410
-
Alexander Dahlberg authored
â¦and removed the no-shuffle tag. This PR fixes #142376 by fixing the flaky test in language_version_test.dart and removes the no-shuffle tag.  ## The Problem The test expected the language version that is set at the top of the test file ('2.13' set in language_version_test.dart â line 14) but defaulted to the language version set in the file it is testing ('2.12' is set in language_version.dart). This problem was hidden when some other test ran before this test and set up the language version correctly.  ## The Fix Make the test itself load the default language version we are testing against.
-
- 02 Feb, 2024 3 commits
-
-
Bartek Pacia authored
This PR attempts to: - reland #140744 - reland #141541 (which is also in #142300 - I will close it once this PR is merged)
-
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!
-
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.
-
- 01 Feb, 2024 3 commits
-
-
Victoria Ashworth authored
When the Dart VM is not found within 10 minutes in CI on CoreDevices (iOS 17+), stop the app and upload the logs from DerivedData. The app has to be stopped first since the logs are not put in DerivedData until it's stopped. Also, rearranged some logic to have CoreDevice have its own function for Dart VM url discovery. Debugging for https://github.com/flutter/flutter/issues/142448.
-
-
Andrew Kolos authored
Resolves https://github.com/flutter/flutter/issues/137700. In particular, see [this comment from the thread](https://github.com/flutter/flutter/issues/137700#issuecomment-1920241979) to see exactly what this PR is addressing.
-
- 31 Jan, 2024 3 commits
-
-
Christopher Fujino authored
Add debugging for #141892 to detect when the temp file mysteriously disappears after running devicectl.
-
Dan Field authored
Refactors `ShaderTarget` to make it opaque as to whether it's using Impeller or SkSL and instead has it focus on the target platform it's generating for. ImpellerC includes SkSL right now whether you ask for it or not. The tester target also might need SkSL or Vulkan depending on whether `--enable-impeller` is passed.
-
LouiseHsu authored
Addresses https://github.com/flutter/flutter/issues/141290 by allow Mac Designed For IPad Devices to appear with 'flutter devices'. <img width="573" alt="Screenshot 2024-01-29 at 12 23 24â¯AM" src="https://github.com/flutter/flutter/assets/36148254/35709a93-56fc-44c9-98d5-cf45afce967d"> <img width="725" alt="Screenshot 2024-01-29 at 12 26 01â¯AM" src="https://github.com/flutter/flutter/assets/36148254/b6cbcfce-44db-42c6-ac01-0ab716d30373">
-
- 29 Jan, 2024 3 commits
-
-
Camille Simon authored
This reverts commit f5ac225c, i.e. https://github.com/flutter/flutter/pull/137115. This is a continuation of https://github.com/flutter/flutter/pull/142266 that was redone based on feedback to make this easier to revert in the future. The exact steps I took to create this revert: 1. Revert commit noted above 2. Fix merge conflicts, that notably involved reverting some changes in https://github.com/flutter/flutter/pull/140744 ~and https://github.com/flutter/flutter/pull/141417~ (fixed my merge to avoid the second PR from being affected) 3. Delete `packages/flutter_tools/test/integration.shard/android_plugin_skip_unsupported_test.dart` as this was added in the commit noted above cc @Gustl22 since I couldn't tag as a reviewer
-
Andrew Kolos authored
Fixes #141211
-
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
-
- 27 Jan, 2024 1 commit
-
-
Zachary Anderson authored
-
- 26 Jan, 2024 7 commits
-
-
Andrew Kolos authored
Fixes https://github.com/flutter/flutter/issues/142285. Part of work on https://github.com/flutter/flutter/pull/141194. This is a refactor. There should be no changes in tool behavior.
-
Christopher Fujino authored
For context https://github.com/flutter/flutter/issues/142338
-
Daco Harkes authored
Update packages from https://github.com/dart-lang/native to the last published stable versions in templates.
-
Andrew Kolos authored
Fixes https://github.com/flutter/flutter/issues/142286 This is a refactor. No code behavior changes should be observed.
-
Jenn Magder authored
The archiving was running in devicelab because certs are needed to codesign (see #73577). However now the certs are available in chromium bots. Move the archiving test into the existing tool integration test, and delete the devicelab variant. arm64: https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8757886514651624673/+/u/run_test.dart_for_tool_host_cross_arch_tests_shard_and_subshard_None/test_stdout#L6074_4 x64: https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8757886514651624689/+/u/run_test.dart_for_tool_host_cross_arch_tests_shard_and_subshard_None/test_stdout#L6389_2 Part of https://github.com/flutter/flutter/issues/142070
-
Bartek Pacia authored
This PR fixes 2 small mistakes in `FlutterExtension`: - all fields must be `public` in order to be used in Gradle Kotlin DSL the same as in Gradle Groovy DSL - using `logger` instead of `project.logger` throws an error when executed This PR re-adds a subset of changes from #141541 which broke the tree and has been reverted.
-
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.
-
- 25 Jan, 2024 1 commit
-
-
Sigurd Meldgaard authored
The legacy welcome message would be printed even if `CI=true` confusing parsers of the output. This fixes: https://github.com/flutter/flutter/issues/139737 --------- Co-authored-by:
eliasyishak <42216813+eliasyishak@users.noreply.github.com>
-