Commit Graph

464 Commits

Author SHA1 Message Date
MarkZ
2a3e27fdd9
Adding support for macrobenchmarking with "flutter run" (#167692)
Notable changes:
* Allows macrobenchmarks to run via `flutter run`.
* Splits macrobenchmarking between "orchestration logic" and "app
serving" (served on separate ports on the same machine to keep the
scheme consistent with the `flutter build` path).
* Adds an intercepted entrypoint for web benchmarks. We can't pass flags
to the app since it's not supported, so I've hard-coded the
orchestration server's port.
* Adding logic to connect to an existing Chrome debugger instance (vs
spawning one) for benchmarks.
2025-04-28 23:39:40 +00:00
Gray Mackall
f02a93bc88
[reland] Fix regression in NDK version checking (#167011)
Relands https://github.com/flutter/flutter/pull/166998.

On top of the original PR:
1. fixes unfortunate mistake in commenting the fix
2. adds to the `runIf` cases to better cover when this test should be
run in presubmit
3. pins a lower version of `shared_preferences_android`, as we need to
use a plugin with `compileSdk 34` for those lower AGP versions.

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md

---------

Co-authored-by: Gray Mackall <mackall@google.com>
2025-04-14 16:38:16 +00:00
auto-submit[bot]
28cc211fcd
Reverts "Fix regression in NDK version checking (#166998)" (#167007)
<!-- start_original_pr_link -->
Reverts: flutter/flutter#166998
<!-- end_original_pr_link -->
<!-- start_initiating_author -->
Initiated by: gmackall
<!-- end_initiating_author -->
<!-- start_revert_reason -->
Reason for reverting:
https://github.com/flutter/flutter/pull/166998#issuecomment-2798030501
<!-- end_revert_reason -->
<!-- start_original_pr_author -->
Original PR Author: gmackall
<!-- end_original_pr_author -->

<!-- start_reviewers -->
Reviewed By: {stuartmorgan-g}
<!-- end_reviewers -->

<!-- start_revert_body -->
This change reverts the following previous change:
Fixes a regression from https://github.com/flutter/flutter/pull/166727/,
see
https://discord.com/channels/608014603317936148/846507907876257822/1360306682999210204

Adds a dependency on `shared_preferences_android` to the smoke tests we
have that run across the range of AGP/Gradle versions we support. Chosen
randomly, just to recreate the error. Hopefully this doesn't push the
test target into timeout range, it was already a kind of long running
one.

The IDE suggestion here was misleading, as this value switched from
nullable to non nullable in AGP 8.1/8.2. Unfortunately the IDE makes
these suggestions based on one AGP version, specified in the project
level `build.gradle.kts`. I checked all other files with our minimum
supported AGP version, and this was the only error.

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md

<!-- end_revert_body -->

Co-authored-by: auto-submit[bot] <flutter-engprod-team@google.com>
2025-04-11 21:35:18 +00:00
Gray Mackall
a4b5a502d0
Fix regression in NDK version checking (#166998)
Fixes a regression from https://github.com/flutter/flutter/pull/166727/,
see
https://discord.com/channels/608014603317936148/846507907876257822/1360306682999210204

Adds a dependency on `shared_preferences_android` to the smoke tests we
have that run across the range of AGP/Gradle versions we support. Chosen
randomly, just to recreate the error. Hopefully this doesn't push the
test target into timeout range, it was already a kind of long running
one.

The IDE suggestion here was misleading, as this value switched from
nullable to non nullable in AGP 8.1/8.2. Unfortunately the IDE makes
these suggestions based on one AGP version, specified in the project
level `build.gradle.kts`. I checked all other files with our minimum
supported AGP version, and this was the only error.

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md

---------

Co-authored-by: Gray Mackall <mackall@google.com>
2025-04-11 19:59:21 +00:00
Matan Lurey
5840236ae5
Re-land: "Remove Cocoon from dev/devicelab, keeping Skia perf stats upload" (#165755)
🚫 **Merge after**
https://flutter-review.googlesource.com/c/recipes/+/64300.

---

This reverts commit 0a2d9f5658.
2025-03-22 21:06:17 +00:00
auto-submit[bot]
0a2d9f5658
Reverts "Remove Cocoon from dev/devicelab, keeping Skia perf stats upload. (#165749)" (#165754)
<!-- start_original_pr_link -->
Reverts: flutter/flutter#165749
<!-- end_original_pr_link -->
<!-- start_initiating_author -->
Initiated by: matanlurey
<!-- end_initiating_author -->
<!-- start_revert_reason -->
Reason for reverting: Still passing command-line arguments from recipes
that have no effect but cause the runner to crash.
<!-- end_revert_reason -->
<!-- start_original_pr_author -->
Original PR Author: matanlurey
<!-- end_original_pr_author -->

<!-- start_reviewers -->
Reviewed By: {jtmcdole}
<!-- end_reviewers -->

<!-- start_revert_body -->
This change reverts the following previous change:
Partial re-land of https://github.com/flutter/flutter/pull/165628:

- Fixes the mistake that the `Cocoon` class did things that well, were
not specific to Cocoon.
- Renamed to `MetricsResultWriter`, as that is all it does now.

---

Closes https://github.com/flutter/flutter/issues/165618.

The `devicelab/bin/test_runner.dart upload-metrics` command use to have
_two_ responsibilities:

- Well, upload test **metrics** (benchmarks) to Skia Perf (it still does
that)
- Upload test **status** to Cocoon (it did until
https://github.com/flutter/flutter/pull/165614)

As https://github.com/flutter/flutter/pull/165614 proved, this API
predated the current LUCI setup, where Cocoon itself receives task
status updates from LUCI, and it turns out this entire time, DeviceLab
was making (at best) NOP calls, and at worst, causing crashes and
corrupt data (https://github.com/flutter/flutter/issues/165610).
<!-- end_revert_body -->

Co-authored-by: auto-submit[bot] <flutter-engprod-team@google.com>
2025-03-22 18:58:47 +00:00
Matan Lurey
05f1980eae
Remove Cocoon from dev/devicelab, keeping Skia perf stats upload. (#165749)
Partial re-land of https://github.com/flutter/flutter/pull/165628:

- Fixes the mistake that the `Cocoon` class did things that well, were
not specific to Cocoon.
- Renamed to `MetricsResultWriter`, as that is all it does now.

---

Closes https://github.com/flutter/flutter/issues/165618.

The `devicelab/bin/test_runner.dart upload-metrics` command use to have
_two_ responsibilities:

- Well, upload test **metrics** (benchmarks) to Skia Perf (it still does
that)
- Upload test **status** to Cocoon (it did until
https://github.com/flutter/flutter/pull/165614)

As https://github.com/flutter/flutter/pull/165614 proved, this API
predated the current LUCI setup, where Cocoon itself receives task
status updates from LUCI, and it turns out this entire time, DeviceLab
was making (at best) NOP calls, and at worst, causing crashes and
corrupt data (https://github.com/flutter/flutter/issues/165610).
2025-03-22 17:48:57 +00:00
auto-submit[bot]
1cf57f1eaa
Reverts "Remove unused Cocoon components from devicelab/bin/test_runner.dart. (#165628)" (#165709)
<!-- start_original_pr_link -->
Reverts: flutter/flutter#165628
<!-- end_original_pr_link -->
<!-- start_initiating_author -->
Initiated by: jtmcdole
<!-- end_initiating_author -->
<!-- start_revert_reason -->
Reason for reverting: breaking tree:


https://ci.chromium.org/ui/p/flutter/builders/prod/Linux_mokey%20backdrop_filter_perf__e2e_summary/3833/overview
<!-- end_revert_reason -->
<!-- start_original_pr_author -->
Original PR Author: matanlurey
<!-- end_original_pr_author -->

<!-- start_reviewers -->
Reviewed By: {jtmcdole, yjbanov}
<!-- end_reviewers -->

<!-- start_revert_body -->
This change reverts the following previous change:
🚫 **Do not merge** until
https://flutter-review.googlesource.com/c/recipes/+/64220/1 is merged.

---

Closes https://github.com/flutter/flutter/issues/165618.

The `devicelab/bin/test_runner.dart upload-metrics` command use to have
_two_ responsibilities:

- Well, upload test **metrics** (benchmarks) to Skia Perf (it still does
that)
- Upload test **status** to Cocoon (it did until
https://github.com/flutter/flutter/pull/165614)

As https://github.com/flutter/flutter/pull/165614 proved, this API
predated the current LUCI setup, where Cocoon itself receives task
status updates from LUCI, and it turns out this entire time, DeviceLab
was making (at best) NOP calls, and at worst, causing crashes and
corrupt data (https://github.com/flutter/flutter/issues/165610).

In other words, this is removing entirely dead/unused code (though the
recipes have to be updated first).

/cc @jason-simmons as I need Jason's help reviewing the recipes change
and want to provide context.
<!-- end_revert_body -->

Co-authored-by: auto-submit[bot] <flutter-engprod-team@google.com>
2025-03-21 22:30:47 +00:00
Matan Lurey
b06c05c6f4
Remove unused Cocoon components from devicelab/bin/test_runner.dart. (#165628)
🚫 **Do not merge** until
https://flutter-review.googlesource.com/c/recipes/+/64220/1 is merged.

---

Closes https://github.com/flutter/flutter/issues/165618.

The `devicelab/bin/test_runner.dart upload-metrics` command use to have
_two_ responsibilities:

- Well, upload test **metrics** (benchmarks) to Skia Perf (it still does
that)
- Upload test **status** to Cocoon (it did until
https://github.com/flutter/flutter/pull/165614)

As https://github.com/flutter/flutter/pull/165614 proved, this API
predated the current LUCI setup, where Cocoon itself receives task
status updates from LUCI, and it turns out this entire time, DeviceLab
was making (at best) NOP calls, and at worst, causing crashes and
corrupt data (https://github.com/flutter/flutter/issues/165610).

In other words, this is removing entirely dead/unused code (though the
recipes have to be updated first).

/cc @jason-simmons as I need Jason's help reviewing the recipes change
and want to provide context.
2025-03-21 21:27:48 +00:00
Victoria Ashworth
425d1bd258
Update tests to use Xcode 16.2 and iOS 18.2 Simulator (#165318)
Runs tests on Xcode 16.2 and iOS 18.2. Also updates engine scenario
golden files to iOS 18.2 and removes non-impeller (Skia) test files that
we no longer use.

All framework tests passing:
https://github.com/flutter/flutter/issues/148899#issuecomment-2701465612
All engine tests passing:
https://github.com/flutter/flutter/issues/148906#issuecomment-2702112378

Fixes https://github.com/flutter/flutter/issues/148907 and
https://github.com/flutter/flutter/issues/148957.

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-03-18 14:13:26 +00:00
Victoria Ashworth
8d100a6416
Get flavor/scheme in assemble command from the build configuration (#162907)
This moves the logic for `FLUTTER_APP_FLAVOR` into `flutter assemble`,
so that it also works when ran through Xcode and not just through the
Flutter CLI.

However, there's no definitive way to get the the flavor/scheme in
`flutter assemble`, so this makes a best effort to get it by parsing it
out of the `CONFIGURATION`. `CONFIGURATION` should have the name of the
scheme in it, although, this is only
[semi-enforced](1d85de0fc8/packages/flutter_tools/lib/src/ios/mac.dart (L201-L203)),
so may not always work. If it's unable to get the scheme name from the
`CONFIGURATION`, it falls back to using the `FLAVOR` environment
variable, which is set by the Flutter CLI and used currently.

Verified `Mac_ios flavors_test_ios` passes:
https://ci.chromium.org/ui/p/flutter/builders/prod.shadow/Mac_ios%20flavors_test_ios/7/overview

Verified `Mac flavors_test_macos` passes:
https://ci.chromium.org/ui/p/flutter/builders/try.shadow/Mac%20flavors_test_macos/2/overview

Fixes https://github.com/flutter/flutter/issues/155951.

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-02-19 20:37:35 +00:00
Matan Lurey
d102e1197e
Remove references to cirrus, mostly in doc comments. (#161529)
Towards https://github.com/flutter/flutter/issues/161387.
2025-01-13 23:49:04 +00:00
Matan Lurey
1d79946ecb
Remove last two references to Cirrus CI. (#161530)
Towards https://github.com/flutter/flutter/issues/161387.
2025-01-13 23:44:40 +00:00
Michael Goderbauer
5491c8c146
Auto-format Framework (#160545)
This auto-formats all *.dart files in the repository outside of the
`engine` subdirectory and enforces that these files stay formatted with
a presubmit check.

**Reviewers:** Please carefully review all the commits except for the
one titled "formatted". The "formatted" commit was auto-generated by
running `dev/tools/format.sh -a -f`. The other commits were hand-crafted
to prepare the repo for the formatting change. I recommend reviewing the
commits one-by-one via the "Commits" tab and avoiding Github's "Files
changed" tab as it will likely slow down your browser because of the
size of this PR.

---------

Co-authored-by: Kate Lovett <katelovett@google.com>
Co-authored-by: LongCatIsLooong <31859944+LongCatIsLooong@users.noreply.github.com>
2024-12-19 20:06:21 +00:00
Gray Mackall
2afaa619cb
Migrate module templates to declarative application of the Flutter Gradle Plugin (#159770)
Fixes https://github.com/flutter/flutter/issues/159729

Cases to consider:
1. Building the module as a standalone app (`flutter run`)
2. Building the module as an aar (`flutter build aar`) 
3. Doing (2) and then building an android host app that depends on the
aar.
4. Building the host app with it depending on the module as source.

Manually tested all 4 and they all are working.

Modified `build_android_host_app_with_module_aar.dart` and
`build_android_host_app_with_module_source.dart` to add checks on
`stderr` to ensure we don't hit the log.


## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md

---------

Co-authored-by: Gray Mackall <mackall@google.com>
2024-12-05 21:32:58 +00:00
Camille Simon
f9f42bee99
[Android] Removes dev dependency plugins from release builds (#158026)
Removes plugins that are `dev_dependency`s from being dependencies of
release builds of Flutter Android app projects.

Fixes https://github.com/flutter/flutter/issues/157949.

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.


<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2024-12-04 18:13:07 +00:00
Matan Lurey
d29a888bf2
Replace \r\n code with Dart SDK standard conventions. (#159346)
Also deleted a file that appeared to be unused.
2024-11-22 19:41:08 +00:00
Yegor
99861b0b98
[web] fix --ab option for web benchmarks (#154574)
Fix the `--ab` option in the benchmark harness:

- Make `--local-engine-host` optional. The web engine doesn't need it, so it doesn't build it. But the tool crashes by failing to find it.
- Disable icon tree shaking because `--ab` runs against local engine build, whose Dart kernel version is out of sync with the framework, which crashes the const finder.
2024-11-06 18:07:17 +00:00
Bartek Pacia
eb5ef69d6b
Use Gradle KTS in new Android app projects by default (2nd try) (#157195)
This PR resolves #151166

This PR relands #154061
2024-10-22 17:28:31 +00:00
auto-submit[bot]
9a41f11610
Reverts "Use Gradle KTS in new Android app projects by default (#154061)" (#157194)
Reverts: flutter/flutter#154061
Initiated by: QuncCccccc
Reason for reverting: might be the reason that cause Framework tree to red
Original PR Author: bartekpacia

Reviewed By: {gmackall, reidbaker}

This change reverts the following previous change:
This PR resolves #151166
2024-10-18 21:14:46 +00:00
Bartek Pacia
d3c54a115f
Use Gradle KTS in new Android app projects by default (#154061)
This PR resolves #151166
2024-10-18 20:46:01 +00:00
Nate Wilson
6b1bc456f4
Arrow syntax for getters (#156483)
This egotistical PR aims to draw attention to a [style guideline](https://github.com/flutter/flutter/blob/master/docs/contributing/Style-guide-for-Flutter-repo.md#use--for-getters-and-callbacks-that-just-return-literals-or-switch-expressions) that I changed:

> #### Use `=>` for getters and callbacks that just return literals or switch expressions

<br>

There was an opportunity for valuable discussion in #154753 about how this structure affects readability, but I shut it down pretty quick since there was a lot of other stuff going on there.

Interested to hear thoughts from @Piinks and others.
2024-10-17 19:25:14 +00:00
Nate Wilson
5ecf10052f
pattern-matching refactor (#154753)
This pull request aims to improve code readability, based on feedback gathered in a recent design doc.

<br>

There are two factors that hugely impact how easy it is to understand a piece of code: **verbosity** and **complexity**.

Reducing **verbosity** is important, because boilerplate makes a project more difficult to navigate. It also has a tendency to make one's eyes gloss over, and subtle typos/bugs become more likely to slip through.

Reducing **complexity** makes the code more accessible to more people. This is especially important for open-source projects like Flutter, where the code is read by those who make contributions, as well as others who read through source code as they debug their own projects.

<hr>

<br>

The following examples show how pattern-matching might affect these two factors:

<details> <summary><h3>Example 1 (GOOD)</h3> [click to expand]</summary>

```dart
if (ancestor case InheritedElement(:final InheritedTheme widget)) {
  themes.add(widget);
}
```

Without using patterns, this might expand to

```dart
if (ancestor is InheritedElement) {
  final InheritedWidget widget = ancestor.widget;
  if (widget is InheritedTheme) {
    themes.add(widget);
  }
}
```

Had `ancestor` been a non-local variable, it would need to be "converted" as well:

```dart
final Element ancestor = this.ancestor;
if (ancestor is InheritedElement) {
  final InheritedWidget inheritedWidget = ancestor.widget;
  if (widget is InheritedTheme) {
    themes.add(theme);
  }
}
```

</details>

<details> <summary><h3>Example 2 (BAD) </h3> [click to expand]</summary>

```dart
if (widget case PreferredSizeWidget(preferredSize: Size(:final double height))) {
  return height;
}
```

Assuming `widget` is a non-local variable, this would expand to:

```dart
final Widget widget = this.widget;
if (widget is PreferredSizeWidget) {
  return widget.preferredSize.height;
}
```

<br>

</details>

In both of the examples above, an `if-case` statement simultaneously verifies that an object meets the specified criteria and performs a variable assignment accordingly.

But there are some differences: Example 2 uses a more deeply-nested pattern than Example 1 but makes fewer useful checks.

**Example 1:**
- checks that `ancestor` is an `InheritedElement`
- checks that the inherited element's `widget` is an `InheritedTheme`

**Example 2:**
- checks that `widget` is a `PreferredSizeWidget`
(every `PreferredSizeWidget` has a `size` field, and every `Size` has a `height` field)

<br>

<hr>

I feel hesitant to try presenting a set of cut-and-dry rules as to which scenarios should/shouldn't use pattern-matching, since there are an abundance of different types of patterns, and an abundance of different places where they might be used.

But hopefully the conversations we've had recently will help us converge toward a common intuition of how pattern-matching can best be utilized for improved readability.

<br><br>

- resolves https://github.com/flutter/flutter/issues/152313
- Design Doc: [flutter.dev/go/dart-patterns](https://flutter.dev/go/dart-patterns)
2024-10-03 18:21:04 +00:00
Ben Konyi
2c84e63ba7
[ Cocoon ] Wait for task results to be received by the task runner before shutting down the task process (#156002)
Prior to this fix, `_TaskRunner.run` would immediately cleanup the
keep-alive port once the task completed, which would result in the
isolate shutting down as soon as the task result was returned from
`ext.cocoonRunTask` callback in the form of a
`ServiceExtensionResponse`. Since the service extension response is
processed by the service isolate, it was possible for the VM to start
shutting down before the service isolate could send the task result data
back to the task runner.

This change introduces a new service extension,
`ext.cocoonTaskResultReceived`, that the task runner invokes after it
receives the task result from `ext.cocoonRunTask`, notifying the task
process that it can close the keep-alive port and shutdown.

Fixes https://github.com/flutter/flutter/issues/155475
2024-10-02 17:01:24 -04:00
Matan Lurey
4b5cf85534
Remove last --disable-dart-dev in flutter/flutter. (#154948)
Work towards https://github.com/flutter/flutter/issues/154268.
2024-09-10 21:37:08 +00:00
Matan Lurey
712cf654d1
Remove --disable-dart-dev across flutter/flutter. (#154280)
As per the Dart CLI team and @bkonyi, this is no longer providing value and we shouldn't cargo-cult it.

Work towards https://github.com/flutter/flutter/issues/154268.
2024-08-29 22:50:04 +00:00
Jonah Williams
df3d35eedb
[devicelan] opt android devices into fixed performance mode. (#154016)
See also: https://developer.android.com/games/optimize/adpf/fixed-performance-mode

Should keep benchmarks more stable so A/B comparisons are appropriate without accounting for CPU/GPU throttling.
2024-08-23 18:11:25 +00:00
Gray Mackall
919bed6e0a
Reland "Update template/test compileSdk, targetSdk, ndk versions" (#153795)
Relands https://github.com/flutter/flutter/pull/152487.

The difference is in the two new commits:
-1354c6d77b
-931788aa5a, short version is that:
- I forgot that I need to override the compileSdkVersion in the AGP 8.0 [instance of this test](ef9cd32f5a/dev/devicelab/bin/tasks/android_java17_dependency_smoke_tests.dart (L19))
- A postsubmit integration test needed new lockfiles + the package attribute -> AGP namespace change.

These were the only two postsubmit failures: [dashboard](https://flutter-dashboard.appspot.com/#/build).
2024-08-21 18:27:00 +00:00
auto-submit[bot]
7730f29024
Reverts "Update template/test compileSdk, targetSdk, ndk versions (#152487)" (#153793)
Reverts: flutter/flutter#152487
Initiated by: gmackall
Reason for reverting: I forgot that I need to override the compileSdkVersion in the AGP 8.0 [instance of this test](ef9cd32f5a/dev/devicelab/bin/tasks/android_java17_dependency_smoke_tests.dart (L19))
Original PR Author: gmackall

Reviewed By: {reidbaker}

This change reverts the following previous change:
Updates `compileSdk`, `targetSdk`, and `ndk` versions (former 2 to latest, latter to the version of the ndk we are hosting on CIPD).

Summary of changes:
- Updates mentioned template values
- `compileSdk` 35 requires AGP 8.0+, so updated to 8.1 in many places.
- This also necessitated Gradle upgrades in most places
- This also necessitated moving the `package` xml attribute to the AGP `namespace` field in a couple places (test + template).
- Some tests use the output of `flutter create` but then use intentionally lower AGP versions. [I downgraded the `compileSdk` in these tests.](fee34fd61a)
- [Stopped lockfile generation](82324a2570) script from hitting the `hello_world` example because it uses `.kts` gradle files.
- One test needed [some Gradle options we had already added to templates](6aa187b4b6).
2024-08-20 21:45:25 +00:00
Gray Mackall
ef9cd32f5a
Update template/test compileSdk, targetSdk, ndk versions (#152487)
Updates `compileSdk`, `targetSdk`, and `ndk` versions (former 2 to latest, latter to the version of the ndk we are hosting on CIPD).

Summary of changes:
- Updates mentioned template values
- `compileSdk` 35 requires AGP 8.0+, so updated to 8.1 in many places.
- This also necessitated Gradle upgrades in most places
- This also necessitated moving the `package` xml attribute to the AGP `namespace` field in a couple places (test + template).
- Some tests use the output of `flutter create` but then use intentionally lower AGP versions. [I downgraded the `compileSdk` in these tests.](fee34fd61a)
- [Stopped lockfile generation](82324a2570) script from hitting the `hello_world` example because it uses `.kts` gradle files.
- One test needed [some Gradle options we had already added to templates](6aa187b4b6).
2024-08-20 21:33:12 +00:00
Zachary Anderson
76107bdf50
Re-enable dds for flutter drive tests that use DevTools (#153129)
Fixes https://github.com/flutter/flutter/issues/153057
2024-08-08 23:50:40 +00:00
Zachary Anderson
fc465348b9
Pass --no-dds to some integration tests driven by flutter drive (#152898)
As in https://github.com/flutter/flutter/pull/152696, It's not clear
that DDS initialization is necessary for any of these tests.

In particular, from the comments on the tool flag:
```
            'It may be necessary to disable this when attaching to an application with '
            'an existing DDS instance (e.g., attaching to an application currently '
            'connected to by "flutter run"), or when running certain tests.\n'
            'Disabling this feature may degrade IDE functionality if a DDS instance is '
            'not already connected to the target application.'
```

These tests are unlikely to need IDE functionality. I have initially
modified the Linux_android_emu tests in the ci.yaml so that they run in
presubmit to verify that this change is safe. Many other postsubmit-only
tests that will now be passed `--no-dds` require physical devices, and
if there is an issue in post-submit, this change will need to be
reverted.
2024-08-05 21:10:56 -07:00
Gray Mackall
a1f03609f7
Set up tests that verify we can build a fresh counter app across our Gradle/AGP/Kotlin support range (#151568)
Sets up tests that verify we can build a fresh counter app across our Gradle/AGP/Kotlin support range.

Post submit only, because the suite takes ~30 minutes to run, and I expect it to be _somewhat_ rare that we break only one of these versions (and therefore it doesn't get caught by existing presubmits).
2024-07-31 19:14:46 +00:00
Loïc Sharma
f2b182f54e
Fix some tests that fail with Swift Package Manager enabled (#152267)
https://github.com/flutter/flutter/pull/152049 was reverted as it broke several post-submit tests. This relands the test fixes in https://github.com/flutter/flutter/pull/152049 without enabling Swift Package Manager on the master channel. 

This change is split into two commits:

1. dd1762abb9 - The changes in https://github.com/flutter/flutter/pull/152049
1. 00fdcfb7bb - Undoes the changes that enabled Swift Package Manager on the master channel

Part of https://github.com/flutter/flutter/issues/151567
2024-07-26 21:08:32 +00:00
auto-submit[bot]
f55ab0e77e
Reverts "Enable Swift Package Manager by default on master channel (#152049)" (#152243)
Reverts: flutter/flutter#152049
Initiated by: cbracken
Reason for reverting: iOS builds failing in post-submit
Original PR Author: loic-sharma

Reviewed By: {jmagman}

This change reverts the following previous change:
Changes:

1. Enables Swift Package Manager by default on the main/master channel
2. Fixes tests that fail if Swift Package Manager is enabled

Corresponding docs change: https://github.com/flutter/website/pull/10938

Addresses https://github.com/flutter/flutter/issues/151567
2024-07-24 16:49:25 +00:00
Loïc Sharma
08d8a7fa81
Enable Swift Package Manager by default on master channel (#152049)
Changes:

1. Enables Swift Package Manager by default on the main/master channel
2. Fixes tests that fail if Swift Package Manager is enabled

Corresponding docs change: https://github.com/flutter/website/pull/10938

Addresses https://github.com/flutter/flutter/issues/151567
2024-07-24 16:24:31 +00:00
Reid Baker
1eb7cd2c73
allow adb to set canfail then use canFail=true for clearing logs (#150517)
Fixes https://github.com/flutter/flutter/issues/150093

New tests added to cover that we at least pass the arguments we expect to adb. 

The test for #150093  is not ideal in that it does not verify the behavior of a failed process but instead ensures we set the parameter that contains the behavior we want. 

devicelab code and tests are not setup to enable fake process or fake output from stdin/stderr and hang if adb or no hardware are present.
2024-06-24 19:13:24 +00:00
Victoria Ashworth
529a4d2bac
Disable sandboxing for macOS apps and tests in CI (#149618)
macOS 14 added new requirements that un-codesigned sandbox apps must be granted access when changed. Waiting for this UI caused macOS tests to fail on macOS 14 because the test runner forced codesigning off. Additionally, adding codesigning is not sufficient, since it must still be approved before codesigning is enough to pass the check. As a workaround, this PR disables sandboxing for macOS apps/tests in CI.

![Screenshot 2024-05-30 at 2 41 33 PM](https://github.com/flutter/flutter/assets/682784/1bc32620-5edb-420a-866c-5cc529b2ac55)

https://developer.apple.com/documentation/updates/security#June-2023)
> App Sandbox now associates your macOS app with its sandbox container using its code signature. The operating system asks the person using your app to grant permission if it tries to access a sandbox container associated with a different app. For more information, see [Accessing files from the macOS App Sandbox](https://developer.apple.com/documentation/security/app_sandbox/accessing_files_from_the_macos_app_sandbox).

And that link explains why this is happening on a macOS 14 update:

> In macOS 14 and later, the operating system uses your app’s code signature to associate it with its sandbox container. If your app tries to access the sandbox container owned by another app, the system asks the person using your app whether to grant access. If the person denies access and your app is already running, then it can’t read or write the files in the other app’s sandbox container. If the person denies access while your app is launching and trying to enter the other app’s sandbox container, your app fails to launch.
> 
> The operating system also tracks the association between an app’s code signing identity and its sandbox container for helper tools, including launch agents. If a person denies permission for a launch agent to enter its sandbox container and the app fails to start, launchd starts the launch agent again and the operating system re-requests access.

Fixes https://github.com/flutter/flutter/issues/149268.
Fixes framework part of https://github.com/flutter/flutter/issues/149264.
Might fix packages issue: https://github.com/flutter/flutter/issues/149329.

Verified framework tests:
https://ci.chromium.org/ui/p/flutter/builders/staging.shadow/Mac%20plugin_test_macos/9/overview
https://ci.chromium.org/ui/p/flutter/builders/staging.shadow/Mac%20run_debug_test_macos/2/overview
https://ci.chromium.org/ui/p/flutter/builders/staging.shadow/Mac%20tool_integration_tests_4_4/2/overview
https://ci.chromium.org/ui/p/flutter/builders/staging.shadow/Mac%20integration_ui_test_test_macos/3/overview
https://ci.chromium.org/ui/p/flutter/builders/staging.shadow/Mac%20flavors_test_macos/3/overview
https://ci.chromium.org/ui/p/flutter/builders/staging.shadow/Mac_benchmark%20complex_layout_scroll_perf_macos__timeline_summary/6/overview
2024-06-04 21:51:19 +00:00
Nate
fa9992eff6
switch statement cleanup (#148382)
This PR is step 12 in the journey to solve issue #136139 and make the
entire Flutter repo more readable.

Most of it involves implementing switch expressions, and there's also a
few other random things that I wanted to clean up a bit.
2024-05-16 17:16:06 -07:00
Pierre-Louis
4a65a76279
Reland: Update link branches to main (#146882)
Reland https://github.com/flutter/flutter/pull/146558, reverted in https://github.com/flutter/flutter/pull/146880 due to an outdated test result

## Original description

- Update CS and googlesource.com link branches
- Update GitHub /blob/ and /tree/ links

Tested links manually and fixes a few broken or deprecated links

Added a test that validates that `master` isn't used, except for specified repos.

Part of https://github.com/flutter/flutter/issues/121564
2024-04-17 13:16:33 +00:00
Pierre-Louis
33a9643b5d
Revert "Update link branches to main" (#146880)
Reverts flutter/flutter#146558

Causes failure
2024-04-17 13:25:18 +02:00
Pierre-Louis
072b8874a0
Update link branches to main (#146558)
- Update CS and googlesource.com link branches
- Update GitHub /blob/ and /tree/ links

Tested links manually and fixes a few broken or deprecated links

Added a test that validates that `master` isn't used, except for
specified repos.

Part of https://github.com/flutter/flutter/issues/121564

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
[Data Driven Fixes]:
https://github.com/flutter/flutter/wiki/Data-driven-Fixes
2024-04-17 09:44:23 +02:00
Kallen Tu
9fd9f042fc
Add info strings to code blocks. (#146085)
In preparation to add the lint
`missing_code_block_language_in_doc_comment`, added info strings to a
bunch of fenced code blocks.

Related to issue: https://github.com/dart-lang/linter/issues/4904

## Pre-launch Checklist

- [X] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [X] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [X] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [X] I signed the [CLA].
- [X] I listed at least one issue that this PR fixes in the description
above.
- [X] I updated/added relevant documentation (doc comments with `///`).
- [X] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [X] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [X] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
[Data Driven Fixes]:
https://github.com/flutter/flutter/wiki/Data-driven-Fixes
2024-04-01 14:05:16 -07:00
Nate
1a0dc8f1e1
Add missing parameter to TableBorder.symmetric, and improve class constructors (#144279)
Originally, my aim was just to refactor (as per usual), but while messing around with the `TableBorder.symmetric` constructor, I realized that `borderRadius` was missing!

This pull request makes a few class constructors more efficient, and it fixes #144277 by adding the missing parameter.

<br>
2024-03-04 20:20:19 +00:00
Nate
c53a18f4e4
Implementing null-aware operators throughout the repository (#143804)
This pull request fixes #143803 by taking advantage of Dart's null-aware operators.

And unlike `switch` expressions ([9 PRs](https://github.com/flutter/flutter/pull/143634) and counting), the Flutter codebase is already fantastic when it comes to null-aware coding. After refactoring the entire repo, all the changes involving `?.` and `??` can fit into a single pull request.
2024-02-23 19:02:22 +00:00
Jonah Williams
27cacca011
[devicelab] migrate new gallery benchmarks to local copy. (#143545)
This is the next step in archiving flutter/gallery - move devicelab tests to use the local copy.
2024-02-15 22:32:38 +00:00
keyonghan
e64a372d6b
Enable the whole logcat log (#143119)
Help with https://github.com/flutter/flutter/issues/142572.
2024-02-08 19:10:07 +00:00
Victoria Ashworth
e5c286e02e
Upload DerivedData logs in CI (#142643)
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.
2024-02-01 21:31:28 +00:00
Victoria Ashworth
410af14fd8
Select simulator runtime for tests based on Xcode's preferred runtime build (#139919)
When creating a simulator for a test, select the runtime based on the selected Xcode's preferred build. This is to prevent it from using a runtime greater than its greatest supported version.

Fixes https://github.com/flutter/flutter/issues/139917.

Example test with both iOS 16 and 17 available: https://chromium-swarm.appspot.com/task?id=6672aca184395a10
2023-12-12 20:05:58 +00:00
Daco Harkes
6ad755536e
Native assets support for Android (#135148)
Support for FFI calls with `@Native external` functions through Native assets on Android. 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 Android.

Mainly follows the design of the previous PRs.

For Android, we detect the compilers inside the NDK inside SDK.

And bundling of the assets is done by the flutter.groovy file.

The `minSdkVersion` is propagated from the flutter.groovy file as well.

The NDK is not part of `flutter doctor`, and users can omit it if no native assets have to be build.
However, if any native assets must be built, flutter throws a tool exit if the NDK is not installed.

Add 2 app is not part of this PR yet, instead `flutter build aar` will tool exit if there are any native assets.
2023-12-07 16:29:11 +00:00