Commit Graph

1893 Commits

Author SHA1 Message Date
Polina Cherkasova
9441f8f6c8
Upgrade leak tracker. (#157369) 2024-10-23 00:42:28 +00:00
Gray Mackall
bcc3146185
Delete line referencing v1 string (#157170)
This property would previously have been used by
ad9e4fef45/shell/platform/android/io/flutter/app/FlutterActivityDelegate.java (L59C31-L59C58)
but isn't used by the new `FlutterActivityAndFragmentDelegate`. It's also recommended to be removed by the original v1->v2 updating guide: https://github.com/flutter/flutter/blob/master/docs/platforms/android/Upgrading-pre-1.12-Android-projects.md
2024-10-21 14:20:22 +00:00
flutter-pub-roller-bot
0549bd8888
Roll pub packages (#156925)
This PR was generated by `flutter update-packages --force-upgrade`.
2024-10-18 20:17:18 +00:00
FMorschel
c40f418c05
Removing unnecessary parenthesis (#156928)
This is simply removing unnecessary parenthesis from various places. This change is because of a change to the unnecessary_parentesis lint that will trigger there. Here is the CL https://dart-review.googlesource.com/c/sdk/+/390161.

- https://github.com/dart-lang/linter/issues/4996

If anything else is needed please let me know. 

I'd like to ask for this PR to wait a bit until the bots are run again on that CL so that I can be sure nothing else will trigger, I will come back here and update this whenever everything is complete. Thanks!
2024-10-17 23:46:25 +00:00
Gray Mackall
d1d9954c45
Support host android apps with kts gradle files for add to app (#156502)
Allows applying of `include_flutter.groovy` via the `apply from:` syntax, which allows using a host app that is using the Gradle Kotlin DSL (the default these days when creating an Android app in AS).

Explanation: The `include_flutter.groovy` script is currently not able to be called by Kotlin gradle files, because it is [intended to be invoked with the following lines](https://docs.flutter.dev/add-to-app/android/project-setup#depend-on-the-modules-source-code):
```
setBinding(new Binding([gradle: this]))                                // new
evaluate(new File(                                                     // new
    settingsDir.parentFile,                                            // new
    'flutter_module/.android/include_flutter.groovy'                   // new
))
```

`setBinding` isn't part of the Kotlin gradle DSL, and there isn't (that I can find) an easy Kotlin equivalent. If this binding isn't set, the reference to `gradle` in `include_flutter.groovy` is wrong, which breaks the script.

This PR modifies `include_flutter.groovy` to also support being invoked through the standard way of invoking a script via the Gradle Groovy/Kotlin DSLs, which is `apply from:` (or it's slightly different Kotlin syntax). The start of the script identifies which of the two approaches is being used by checking if the binding is set, and then initializes some variables differently depending on the case.

If we land this, I believe we should update the example Gradle files for both the `kts` and `groovy` cases to prefer the `apply from` syntax as I think this is the syntax most developers would be more familiar with already seeing in their Gradle files.
2024-10-16 22:47:27 +00:00
Jonah Williams
4505e00bf2
[devicelab] try waiting for first frame. (#156907)
From testing locally, sometimes the first frame rasterization takes longer. Could be related to https://github.com/flutter/flutter/issues/156903
2024-10-15 20:37:09 +00:00
auto-submit[bot]
c1a301e8e8
Reverts "Manual pub roll (#156549)" (#156607)
Reverts: flutter/flutter#156549
Initiated by: christopherfujino
Reason for reverting: https://github.com/flutter/flutter/issues/156606
Original PR Author: christopherfujino

Reviewed By: {matanlurey}

This change reverts the following previous change:
I manually ran:

```
flutter update-packages --force-upgrade
cd dev/tools && dart bin/generate_gradle_lockfiles.dart --no-gradle-generation --no-exclusion
```

Note this bumps the `google_mobile_ads` plugin, which caused https://github.com/flutter/flutter/issues/156474. I expect it to work this time after https://flutter-review.googlesource.com/c/recipes/+/60340
2024-10-11 18:52:18 +00:00
Christopher Fujino
184deff0f2
Manual pub roll (#156549)
I manually ran:

```
flutter update-packages --force-upgrade
cd dev/tools && dart bin/generate_gradle_lockfiles.dart --no-gradle-generation --no-exclusion
```

Note this bumps the `google_mobile_ads` plugin, which caused https://github.com/flutter/flutter/issues/156474. I expect it to work this time after https://flutter-review.googlesource.com/c/recipes/+/60340
2024-10-11 17:57:36 +00:00
auto-submit[bot]
0403c1cb8f
Reverts "Roll pub packages (#156440)" (#156473)
Reverts: flutter/flutter#156440
Initiated by: zanderso
Reason for reverting: Failing in post submit with
```
[2024-10-08 18:00:22.743647] [STDOUT] stdout:                [!] CocoaPods could not find compatible versions for pod "Google-Mobile-Ads-SDK":
[2024-10-08 18:00:22.743695] [STDOUT] stdout:                  In Podfile:
[2024-10-08 18:00:22.743718] [STDOUT] stdout:                    google_mobile_ads (from `.symlinks/plugins/google_mobile_ads/ios`) was resolved t
Original PR Author: flutter-pub-roller-bot

Reviewed By: {fluttergithubbot}

This change reverts the following previous change:
This PR was generated by `flutter update-packages --force-upgrade`.
2024-10-09 13:45:47 +00:00
flutter-pub-roller-bot
f96d1618c4
Roll pub packages (#156440)
This PR was generated by `flutter update-packages --force-upgrade`.
2024-10-08 23:28:01 +00:00
flutter-pub-roller-bot
b9e71f7d12
Roll pub packages (#156284)
This PR was generated by `flutter update-packages --force-upgrade`.
2024-10-08 22:01:03 +00:00
flutter-pub-roller-bot
d6725e7c01
Roll pub packages (#156254)
This PR was generated by `flutter update-packages --force-upgrade`.
2024-10-04 22:47:16 +00:00
flutter-pub-roller-bot
1371d9d916
Roll pub packages (#156215)
This PR was generated by `flutter update-packages --force-upgrade`.
2024-10-04 11:59:31 +00:00
flutter-pub-roller-bot
be792afc51
Roll pub packages (#156159)
This PR was generated by `flutter update-packages --force-upgrade`.
2024-10-03 18:32:06 +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
flutter-pub-roller-bot
a9047e93bc
Roll pub packages (#156117)
This PR was generated by `flutter update-packages --force-upgrade`.
2024-10-02 23:01:09 +00:00
flutter-pub-roller-bot
4ad274720f
Roll pub packages (#156114)
This PR was generated by `flutter update-packages --force-upgrade`.
2024-10-02 21:12:16 +00:00
flutter-pub-roller-bot
33baedab60
Roll pub packages (#156105)
This PR was generated by `flutter update-packages --force-upgrade`.
2024-10-02 19:18:54 +00:00
flutter-pub-roller-bot
d59499988a
Roll pub packages (#155846)
This PR was generated by `flutter update-packages --force-upgrade`.
2024-10-01 22:45:08 +00:00
Denis Gordin
31d6b35b7f
Move FlutterLogo from material to widget (#155864)
The PR is moving FlutterLogo from `lib/src/material` to `lib/src/widgets` because it has no dependency on Material.

Issue: https://github.com/flutter/flutter/issues/154448

PS: There is [older PR](https://github.com/flutter/flutter/pull/154711) for this issue and I don't know the policy on conflicting PRs. Let me know if I need to drop mine.
2024-09-30 17:19:25 +00:00
Gray Mackall
cad7418f0a
Roll packages manually (#155786)
*Replace this paragraph with a description of what this PR is changing or adding, and why. Consider including before/after screenshots.*

*List which issues are fixed by this PR. You must list at least one issue. An issue is not required if the PR fixes something trivial like a typo.*

*If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
2024-09-27 00:49:08 +00:00
flutter-pub-roller-bot
db76401cd8
Roll pub packages (#155640)
This PR was generated by `flutter update-packages --force-upgrade`.
2024-09-25 00:03:57 +00:00
Daco Harkes
aef2758716
[native assets] Roll dependencies (#155432)
Rolls native deps to the latest version, and cleans up deprecated field from template.

Tests:

* All the unit and integration tests for native assets. The template and dependencies are exercised in the integration test.

Since `package:native_assets_builder` already checks for having no static libraries as output, the custom check in flutter_tools is removed. The tests stubbing out the native assets builder exercising the custom check are also removed. (The integration tests now check for the error message from the native assets builder.)
2024-09-24 07:19:09 +00:00
Gray Mackall
303f222e17
Manual roll to 48ddaf578fb0c8326d5b4b680b0f49ea72e33216 (#155070)
Manual roll, because https://github.com/flutter/engine/pull/55095 updates dependencies, and so it needs gradle lockfiles re generated.
2024-09-12 17:58:12 +00:00
Matan Lurey
5d5e633c44
Move (dev/tools), complete v0 of native_driver (Android) (#154843)
**This is a WIP**, and the only reason it is not a draft PR is so that Flutter (Skia) Gold is executed.

---

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

Work towards https://github.com/flutter/flutter/issues/148269.
2024-09-11 23:56:21 +00:00
Matan Lurey
0e6c16c27a
Migrate apple-mobile-web-* to mobile-web-*. (#154964)
Closes https://github.com/flutter/flutter/issues/154596.

It's less clear to me if your goal was to migrate _all_ of these btw:
https://github.com/search?q=org%3Aflutter+%22mobile-web-app-capable%22&type=code
2024-09-11 00:39:51 +00:00
flutter-pub-roller-bot
ee89e9a560
Roll pub packages (#154890)
This PR was generated by `flutter update-packages --force-upgrade`.
2024-09-10 01:27:22 +00:00
Siva
d7a658d705
Roll Flutter Engine from c50eb8a65097 to 419fb8c0ab3e (#154734)
c50eb8a650...419fb8c0ab

2024-09-06 98614782+auto-submit[bot]@users.noreply.github.com Reverts
"[engine] always force platform channel responses to schedule a task.
(https://github.com/flutter/flutter/issues/54975)"
(https://github.com/flutter/engine/pull/55000)
2024-09-06
[skia-flutter-autoroll@skia.org](mailto:skia-flutter-autoroll@skia.org)
Roll Skia from b6bab0fde426 to 6ad117bd2efe (2 revisions)
(https://github.com/flutter/engine/pull/54999)
2024-09-06
[skia-flutter-autoroll@skia.org](mailto:skia-flutter-autoroll@skia.org)
Roll Fuchsia Test Scripts from D9INMR2u4wcyiZ750... to
5dqcFlKzRjJb6V95W... (https://github.com/flutter/engine/pull/54998)
2024-09-06
[skia-flutter-autoroll@skia.org](mailto:skia-flutter-autoroll@skia.org)
Roll Skia from a09312b70d37 to b6bab0fde426 (3 revisions)
(https://github.com/flutter/engine/pull/54997)
2024-09-06
[skia-flutter-autoroll@skia.org](mailto:skia-flutter-autoroll@skia.org)
Roll Skia from 368f209ccca5 to a09312b70d37 (1 revision)
(https://github.com/flutter/engine/pull/54995)
2024-09-06
[skia-flutter-autoroll@skia.org](mailto:skia-flutter-autoroll@skia.org)
Roll Skia from aec11ae18bb6 to 368f209ccca5 (3 revisions)
(https://github.com/flutter/engine/pull/54992)
2024-09-06
[skia-flutter-autoroll@skia.org](mailto:skia-flutter-autoroll@skia.org)
Roll Fuchsia Linux SDK from xNv47d1TZmK9XgTxu... to PBeI0gGvgFdXV6hCg...
(https://github.com/flutter/engine/pull/54990)
2024-09-06
[skia-flutter-autoroll@skia.org](mailto:skia-flutter-autoroll@skia.org)
Roll Skia from 809f868ded1c to aec11ae18bb6 (22 revisions)
(https://github.com/flutter/engine/pull/54988)
2024-09-06
[30870216+gaaclarke@users.noreply.github.com](mailto:30870216+gaaclarke@users.noreply.github.com)
Removes the int storage from Color
(https://github.com/flutter/engine/pull/54714)
2024-09-06 [chris@bracken.jp](mailto:chris@bracken.jp) iOS,macOS: Add
logging of duplicate codesign binaries
(https://github.com/flutter/engine/pull/54987)
2024-09-06
[skia-flutter-autoroll@skia.org](mailto:skia-flutter-autoroll@skia.org)
Roll Fuchsia Test Scripts from k4lKsecg0pdIp-U7c... to
D9INMR2u4wcyiZ750... (https://github.com/flutter/engine/pull/54984)
2024-09-05
[a-siva@users.noreply.github.com](mailto:a-siva@users.noreply.github.com)
Manual roll of Dart. (https://github.com/flutter/engine/pull/54983)
2024-09-05 [chris@bracken.jp](mailto:chris@bracken.jp) iOS,macOS: add
unsigned_binaries.txt (https://github.com/flutter/engine/pull/54977)
2024-09-05
[jason-simmons@users.noreply.github.com](mailto:jason-simmons@users.noreply.github.com)
Manual Skia roll to 809f868ded1c
(https://github.com/flutter/engine/pull/54972)
2024-09-05
[1961493+harryterkelsen@users.noreply.github.com](mailto:1961493+harryterkelsen@users.noreply.github.com)
[canvaskit] Fix incorrect calculation of ImageFilter paint bounds
(https://github.com/flutter/engine/pull/54980)
2024-09-05 [jonahwilliams@google.com](mailto:jonahwilliams@google.com)
[engine] always force platform channel responses to schedule a task.
(https://github.com/flutter/engine/pull/54975)
2024-09-05
[tugorez@users.noreply.github.com](mailto:tugorez@users.noreply.github.com)
Fix unexpected ViewFocus events when Text Editing utilities change focus
in the middle of a blur call.
(https://github.com/flutter/engine/pull/54965)

Also rolling transitive DEPS:
fuchsia/sdk/core/linux-amd64 from xNv47d1TZmK9 to PBeI0gGvgFdX

---------

Co-authored-by: Christopher Fujino <christopherfujino@gmail.com>
Co-authored-by: Zachary Anderson <zanderso@users.noreply.github.com>
2024-09-06 15:42:07 -07:00
gaaclarke
d1385a4827
Adds wide gamut framework test (#153319)
issue: https://github.com/flutter/flutter/issues/127855

## 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
2024-09-03 09:41:30 -07:00
Daco Harkes
6a47cdb6b5
[native assets] Roll dependencies (#154507)
Roll the dependencies from dart-lang/native.
2024-09-03 16:07:08 +00:00
flutter-pub-roller-bot
5e285635a8
Roll pub packages (#154352)
This PR was generated by `flutter update-packages --force-upgrade`.
2024-08-29 17:46:09 +00:00
flutter-pub-roller-bot
f9351fae7e
Roll pub packages (#154267)
This PR was generated by `flutter update-packages --force-upgrade`.
2024-08-29 16:28:08 +00:00
Polina Cherkasova
3379460596
Upgrade leak tracker. (#154157) 2024-08-28 05:23:18 +00:00
flutter-pub-roller-bot
1a5cbbfbe8
Roll pub packages (#154126)
This PR was generated by `flutter update-packages --force-upgrade`.
2024-08-26 19:36:13 +00:00
auto-submit[bot]
6608936e6d
Reverts "Roll pub packages (#154044)" (#154113)
Reverts: flutter/flutter#154044
Initiated by: zanderso
Reason for reverting: Version does not exist.
Original PR Author: flutter-pub-roller-bot

Reviewed By: {fluttergithubbot}

This change reverts the following previous change:
This PR was generated by `flutter update-packages --force-upgrade`.
2024-08-26 15:49:25 +00:00
flutter-pub-roller-bot
9308a799c6
Roll pub packages (#154044)
This PR was generated by `flutter update-packages --force-upgrade`.
2024-08-25 20:58:24 +00:00
Matan Lurey
5e194383af
Add a test of an Android platform view that draws a gradient (#153878)
Closes https://github.com/flutter/flutter/issues/152376.

The gradient, for posterity, looks like this:

<img src="https://github.com/user-attachments/assets/bed9599a-4e16-499c-af79-b51980095e89" width="150">

Let's see if CI agrees!

/cc @johnmccutchan
2024-08-23 18:25:40 +00:00
Michael Goderbauer
41c2f550ce
Manual pub roll (#153961)
Supersedes https://github.com/flutter/flutter/pull/153869
2024-08-22 22:28:19 +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
flutter-pub-roller-bot
fbed99fd4b
Roll pub packages (#153838)
This PR was generated by `flutter update-packages --force-upgrade`.
2024-08-21 12:25:21 +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
flutter-pub-roller-bot
55b9c5a571
Roll pub packages (#153581)
This PR was generated by `flutter update-packages --force-upgrade`.
2024-08-17 00:44:08 +00:00
flutter-pub-roller-bot
70460854d1
Roll pub packages (#153479)
This PR was generated by `flutter update-packages --force-upgrade`.
2024-08-15 16:39:28 +00:00
Michael Goderbauer
2a4e004bc0
manual pub roll w/ gradle updates (#153403)
Follow-up to https://github.com/flutter/flutter/pull/153388.
2024-08-14 21:06:11 +00:00
flutter-pub-roller-bot
5f99d5782a
Roll pub packages (#153380)
This PR was generated by `flutter update-packages --force-upgrade`.
2024-08-13 19:12:24 +00:00
flutter-pub-roller-bot
2f0415f37b
Roll pub packages (#153297)
This PR was generated by `flutter update-packages --force-upgrade`.
2024-08-12 18:41:58 +00:00
Loïc Sharma
0edc468c78
Clean up .gitignore files (#153060)
This removes some unnecessary `.gitignore` files that are already covered by the top-level `.gitignore` file.

This ensures that `flutter run`ning examples in this repo doesn't result in modifications by the new Swift Package Manager migration.

Follow up to https://github.com/flutter/flutter/pull/152766

Part of https://github.com/flutter/flutter/issues/148018
2024-08-08 22:19:39 +00:00
Kevin Moore
a04ecb2b72
Roll pub packages [manual] (#153066) 2024-08-08 17:08:07 +00:00
Zachary Anderson
c4e19962bb
Fix Linux_android_emu tests late initialization errors (#152932)
This does not fix the issue underlying
https://github.com/flutter/flutter/issues/152684, but may prevent `adb
logcat` from ending before we've captured the logs that explain why the
app or emulator are potentially crashing.

Fixes Fixes https://github.com/flutter/flutter/issues/152899
2024-08-06 14:48:50 -07:00
flutter-pub-roller-bot
1e3a200637
Roll pub packages (#152956)
This PR was generated by `flutter update-packages --force-upgrade`.
2024-08-06 21:08:55 +00:00
flutter-pub-roller-bot
772bf44691
Roll pub packages (#152945)
This PR was generated by `flutter update-packages --force-upgrade`.
2024-08-06 19:08:37 +00:00
Kevin Moore
3612ba1fce
Manual dependency bump (#152881)
`package:collection` is 50+ days behind at this point which is blocking updates to a number of other packages `http_parser`, `shelf`, etc...
2024-08-06 02:40:27 +00:00
flutter-pub-roller-bot
51646d091b
Roll pub packages (#152127)
This PR was generated by `flutter update-packages --force-upgrade`.
2024-08-05 20:14:23 +00:00
Matan Lurey
97996b07a2
Use print logging on LUCI. (#152776)
Work around https://github.com/flutter/flutter/issues/152775 diagnosing https://github.com/flutter/flutter/issues/152769.
2024-08-02 23:21:18 +00:00
Matan Lurey
4ff9462be8
Fix local testing, gradle XML errors, and enable on CI. (#152383)
TIL you cannot have XML comments before the initial `<?xml` declaration.

Follow-up to https://github.com/flutter/flutter/pull/152326.
2024-08-01 09:10:45 -07:00
Greg Spencer
b05c2fad0c
Add find.backButton finder and StandardComponentType enum to find components in tests. (#149349)
## Description

This adds `find.backButton()` in the Common Finders to allow finding different types of standard UI elements. It works by attaching a key made from an enum value in a new enum called `StandardComponentType` to all of the standard widgets that perform the associated function.

I also substituted the finder in several places where it is useful in tests.

This allows writing tests that want to find the "back" button without having to know exactly which icon the back button uses under what circumstances.  To do it correctly is actually quite complicated, since there are several adaptations that occur (based on platform, and whether it is web or not).

## Tests
 - Added tests.
2024-07-30 01:29:31 +00:00
Matan Lurey
7f8ad8a4cb
Add and use an integration test with native(ADB) screenshots (#152326)
Closes https://github.com/flutter/flutter/issues/152325.

This PR is large due to generate `flutter create --platforms android`. A quick summary:

- Moves the integration test from `packages/flutter_driver/test` to `dev/integration_tests`
- Created a sample Flutter app that draws a blue rectangle
- Forked a subset of `package:flutter_goldens` that will work on the standalone Dart VM
- Forked a subset of `goldens.dart` (from `flutter_test`) to `src/native/goldens.dart` (i.e. `matchesGoldenFile`)

This ... works locally, but as usual I have no idea if it will work on Skia Gold so let's roll some dice.
2024-07-26 16:09:29 +00:00
Jackson Gardner
8f0e77696f
Set dart defines properly while in debug mode. (#152262)
Turns out just supporting the right value for `kDebugMode` was a lot simpler than I thought. Debug builds used to never go through the build system code path when using `flutter run`, but now that we have wasm this can occur with the run command.

This should address https://github.com/flutter/flutter/issues/148850
2024-07-25 22:00:50 +00:00
flutter-pub-roller-bot
89c88ae8e8
Roll pub packages (#151992)
This PR was generated by `flutter update-packages --force-upgrade`.
2024-07-19 10:11:32 +00:00
flutter-pub-roller-bot
8c17a747c9
Roll pub packages (#151946)
This PR was generated by `flutter update-packages --force-upgrade`.
2024-07-18 10:57:41 +00:00
flutter-pub-roller-bot
1d816f58cb
Roll pub packages (#151904)
This PR was generated by `flutter update-packages --force-upgrade`.
2024-07-18 09:52:29 +00:00
flutter-pub-roller-bot
bed034add2
Roll pub packages (#151816)
This PR was generated by `flutter update-packages --force-upgrade`.
2024-07-16 12:34:24 +00:00
Daco Harkes
da48b34f50
[native_assets] Roll deps (#151662)
Roll deps to address:

* https://github.com/dart-lang/native/issues/1256

Cross-linking Dart standalone CL: https://dart-review.googlesource.com/c/sdk/+/375461 (no breaking API changes)
2024-07-13 05:37:24 +00:00
Chris Bracken
68f375fe38
[macOS] support secure restorable state by default (#151605)
By default, Flutter apps only do default AppKit app serialisation of
Window location etc. and by default, state serialisation in AppKit apps
is compatible with `NSSecureCoding`. AppKit apps generated since Xcode
13.2 include this method in the app delegate generated by the default
app template.

Background
==========

This method was added to opt into having [de]serialization require a
coder implementing the `NSSecureCoding` protocol. Apple wasn't able to
force this across the board, because `NSSecureCoding` limits certain
behaviours during deserialisation, which some third-party apps have have
previously relied on.

Specific background on the sorts of vulnerabilities that
`NSSecureCoding` was designed to prevent are described in the
`NSSecureCoding` documentation:

https://developer.apple.com/documentation/foundation/nssecurecoding?language=objc

A demonstration of a root privilege escalation and SIP bypass
vulnerability is described in the following blog post:
https://sector7.computest.nl/post/2022-08-process-injection-breaking-all-macos-security-layers-with-a-single-vulnerability/

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

## 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 `///`).
- [ ] 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
2024-07-12 11:08:26 -07:00
Daco Harkes
cec2400658
[native_assets] Stop running link hooks in JIT mode (#151534)
Stop running link hooks in debug mode.

Rationale: link hooks only get access to tree-shaking info in release builds, so they can't do anything meaningful in debug builds. Debug builds should be fast as development cycle, so running less is better.

More details:

* https://github.com/dart-lang/native/issues/1252

Also: rolls packages to latest versions.

## Implementation details

The decision whether linking is enabled is made as follows:

* For normal builds `build_info.dart::BuildMode` is used to determine whether Dart is compiled in JIT or AOT mode.
* Testers always run in JIT, so no linking.
* Native asset dry runs only run for JIT builds (e.g only when hot reload and hot restart are enabled).

## Testing

The integration test is updated to output an asset for linking if `BuildConfig.linkingEnabled` is true, and to output an asset for bundling directly if linking is not enabled.
2024-07-12 06:44:23 +00:00
flutter-pub-roller-bot
5f7564d989
Roll pub packages (#151492)
This PR was generated by `flutter update-packages --force-upgrade`.
2024-07-09 22:47:35 +00:00
Daco Harkes
9ab8b6e150
[deps] Roll dart-lang/native packages (#151403)
Pass in the minimum iOS and MacOS version.

Roll dart-lang/native deps.

Related issues:

* https://github.com/flutter/flutter/issues/145104
* Relevant discussion: https://github.com/flutter/flutter/pull/148504
2024-07-09 07:41:35 +00:00
flutter-pub-roller-bot
bf40ae3bc7
Roll pub packages (#151203)
This PR was generated by `flutter update-packages --force-upgrade`.
2024-07-03 21:47:16 +00:00
Andrew Kolos
271e0427e3
[tool] remove some temporary printTrace calls (#151074)
Cleans up printTrace calls added while investigating https://github.com/flutter/flutter/issues/146879.

Also makes[ this `catch` clause ](https://github.com/flutter/flutter/pull/151074/files#diff-214723283174eb75e740a102252215723aa56716226ea92d084ef8a5bea4e931L578-R581)more precise.
2024-07-02 00:53:19 +00:00
flutter-pub-roller-bot
e8caee1a90
Roll pub packages (#151028)
This PR was generated by `flutter update-packages --force-upgrade`.
2024-07-01 17:43:58 +00:00
flutter-pub-roller-bot
90f2c58d7f
Roll pub packages (#151022)
This PR was generated by `flutter update-packages --force-upgrade`.
2024-06-29 02:17:17 +00:00
Gray Mackall
f23dbc50f0
Manual engine roll to ddd4814 (#150952)
Manual engine roll up to https://github.com/flutter/engine/pull/53592.

Manual roll because the change requires Gradle lockfiles to be re-generated.
2024-06-27 21:57:32 +00:00
Gray Mackall
0198afa1a4
Reland "Remove dual_screen from new_gallery integration test" (#150873)
Relands https://github.com/flutter/flutter/pull/150808

The original version of the pr [accidentally deleted the back button](https://github.com/flutter/flutter/pull/150808#discussion_r1655444210), which didn't block the app building but made the test hang because it couldn't back out of the demo pages.

Repro-ed the failure, and then tested that 
```
new_gallery_opengles_impeller__transition_perf
new_gallery__transition_perf
new_gallery_impeller_old_zoom__transition_perf
new_gallery__crane_perf
new_gallery_impeller__transition_perf
```

All pass on my pixel 7 pro, with ` dart bin/test_runner.dart test -t <test>`, after re-adding the mistakenly deleted content.

Did not test on an iOS device (I don't have one), but those tests were failing for the same reason from what I can tell:
```
> reply@study
[2024-06-26 12:49:21.884543] [STDOUT] stdout: [        ] scrolling to demo
[2024-06-26 12:49:22.412479] [STDOUT] stdout: [ +527 ms] tapping demo
[2024-06-26 12:49:28.075978] [STDOUT] stderr: [+5663 ms] VMServiceFlutterDriver: tap message is taking a long time to complete...
```
Which is the same error, and which makes sense - they got stuck because they couldn't back out of the page.

Sorry for the churn 🙏
2024-06-26 23:37:55 +00:00
auto-submit[bot]
43a8b6af53
Reverts "Remove dual_screen from new_gallery integration test (#150808)" (#150871)
Reverts: flutter/flutter#150808
Initiated by: gmackall
Reason for reverting: Causing the new_gallery tests to hang.

I can repro now though, so should be able to find a fix shortly
Original PR Author: gmackall

Reviewed By: {christopherfujino, johnmccutchan, jtmcdole, jonahwilliams}

This change reverts the following previous change:
Removes the `dual_screen` package from `new_gallery`. Unblocks the fourth attempt to land https://github.com/flutter/engine/pull/53001.
2024-06-26 19:47:18 +00:00
Gray Mackall
1d1367678a
Remove dual_screen from new_gallery integration test (#150808)
Removes the `dual_screen` package from `new_gallery`. Unblocks the fourth attempt to land https://github.com/flutter/engine/pull/53001.
2024-06-26 19:06:55 +00:00
auto-submit[bot]
778eaf6c1d
Reverts "Manual engine roll to 6884e83 (#150733)" (#150746)
Reverts: flutter/flutter#150733
Initiated by: gmackall
Reason for reverting: This breaks apps that use plugins that use `compileSdk` 31, some of which we use in our postsubmit (so it blocks the tree). 
Original PR Author: gmackall

Reviewed By: {jason-simmons}

This change reverts the following previous change:
Manual engine roll to https://github.com/flutter/engine/pull/53532, because the roll requires lockfile generation.
2024-06-25 01:20:29 +00:00
Gray Mackall
ca116ee535
Manual engine roll to 6884e83 (#150733)
Manual engine roll to https://github.com/flutter/engine/pull/53532, because the roll requires lockfile generation.
2024-06-25 00:52:07 +00:00
Jason Simmons
a27d013850
Manual engine roll to be7db94196fe (#150714)
Includes updates to Gradle lockfiles required by https://github.com/flutter/engine/pull/53280
2024-06-24 20:19:08 +00:00
Gray Mackall
4a84fb0fea
Remove discontinued device_info and connectivity plugins from flutter_gallery, roll pub packages (#150585)
Removes these two discontinued plugins from `dev/integration_tests/flutter_gallery`

[`device_info`](https://pub.dev/packages/device_info):
Apparently the video playback doesn't work on iOS simulators (I wasn't able to verify this, as I don't have an iOS simulator installed). I removed the guard against running on those simulators, and replaced with a note in the README.

[`connectivity`](https://pub.dev/packages/connectivity):
This plugin was used to play the bee video from the network. I changed the demo so that the bee video is instead also played from an asset (like its friend the butterfly), and then removed the use of the plugin.

Unblocks the re-land of https://github.com/flutter/engine/pull/53462 (itself a reland 🙂), because of https://github.com/flutter/flutter/pull/150465#issuecomment-2181403712.
2024-06-21 23:10:24 +00:00
Kate Lovett
62586dc09d
Update old wiki links (#149544)
Part of https://github.com/flutter/flutter/issues/145009

Finishes updating links in the repo that pointed to the old wiki
2024-06-17 17:26:08 +00:00
John McDole
e80bbd929e
Fix flaky complex_layout_scroll_perf__memory & flutter_gallery__memory_nav (#150368)
Initial tap is missing sometimes; either its never delivered or it is
delivered before gesture controller is hooked up.

1: Update MemoryTest to have option `requiresTapToStart` guarding the
   new paths
2: Update the two perf tests that appear to be flaky to output when
   TAPPED is received
3: Update the MemoryTest to keep tapping while waiting for TAPPED

Tested on devicelab:
* setting iterations=1
* removing the timeout before READY
* running tests in a while loop

Before this change, you could get the test to hang often. After this
change you'll see "tapping device... [x]" where x is the counter.

Fixes https://github.com/flutter/flutter/issues/150096
2024-06-17 17:14:47 +00:00
auto-submit[bot]
9fe71d99b9
Reverts "Fix flaky complex_layout_scroll_perf__memory test (#150287)" (#150293)
Reverts: flutter/flutter#150287
Initiated by: jtmcdole
Reason for reverting: other memperf tests don't wait for or send a TAPPED; so they fail.
Original PR Author: jtmcdole

Reviewed By: {gaaclarke}

This change reverts the following previous change:
Initial tap is missing sometimes; either its never delivered or it is delivered before gesture controller is hooked up.

1: Update the two perf tests to output when TAPPED is received
2: Update the MemoryTest to keep tapping while waiting for TAPPED

Tested on devicelab:
* setting iterations=1
* removing the timeout before READY
* running tests in a while loop

Before this change, you could get the test to hang often. After this change you'll see "tapping device... [x]" where x is the counter.

Fixes #150096
2024-06-15 03:27:28 +00:00
John McDole
499c84cbf8
Fix flaky complex_layout_scroll_perf__memory test (#150287)
Initial tap is missing sometimes; either its never delivered or it is delivered before gesture controller is hooked up.

1: Update the two perf tests to output when TAPPED is received
2: Update the MemoryTest to keep tapping while waiting for TAPPED

Tested on devicelab:
* setting iterations=1
* removing the timeout before READY
* running tests in a while loop

Before this change, you could get the test to hang often. After this change you'll see "tapping device... [x]" where x is the counter.

Fixes #150096
2024-06-15 00:55:05 +00:00
flutter-pub-roller-bot
e110fdd1c9
Roll pub packages (#150267)
This PR was generated by `flutter update-packages --force-upgrade`.
2024-06-14 18:19:41 +00:00
Greg Spencer
d68e05bf36
Reland: Request focus if accessibility focus is given to a Focus widget (#142942) (#149840)
## Description

This attempts to re-land #142942 after being reverted in https://github.com/flutter/flutter/pull/149741 because it broke the iOS [platform view UI integration test](https://github.com/flutter/flutter/blob/master/dev/integration_tests/ios_platform_view_tests/ios/PlatformViewUITests/PlatformViewUITests.m?rgh-link-date=2024-06-06T19%3A47%3A27Z).

The changes here from the original are that in the Focus widget we no longer set the `onFocus` for the `Semantics` if the platform is iOS.  It was not intended to do anything on iOS anyhow.

Also, I updated the matchers to not actually do anything yet with the SemanticsAction.focus matching, so that this can be landed without breaking customer tests, and once they have been updated to correctly look for the focus action, we can land a PR that will turn it on.

## Related Issues
 - https://github.com/flutter/flutter/issues/149838
 - https://github.com/flutter/flutter/issues/83809
 - https://github.com/flutter/flutter/issues/149842

## Tests
 - Updated framework tests to look for the appropriate things using the matchers, even though it doesn't actually test for them yet.
2024-06-12 20:05:10 +00:00
flutter-pub-roller-bot
ad462e2783
Roll pub packages (#150070)
This PR was generated by `flutter update-packages --force-upgrade`.
2024-06-12 05:40:31 +00:00
Michael Goderbauer
1b8d083ab6
Manual Pub Roll (#150025)
Supersedes https://github.com/flutter/flutter/pull/149908
2024-06-11 00:02:26 +00:00
Gray Mackall
b889e3a6f7
Unpin camera_android and remove its only usage (#150017)
Fixes https://github.com/flutter/flutter/issues/146004

The `camera_android`plugin had its version pinned when it was still used in the `gradle_deprecated_settings`. It has since been [replaced](https://github.com/flutter/flutter/pull/148426) by `camera_android_camerax`, and therefore isn't used in `flutter/flutter`. So it's pin should be fine to remove.
2024-06-10 22:13:00 +00:00
Jason Simmons
4e6e61dfd5
Retain the toString method for subclasses of Key in profile/release mode (#149926)
toString methods are removed in AOT builds by the optimization in https://github.com/flutter/flutter/pull/144763

This PR disables that for Key subclasses because some applications rely on the previous behavior.

Fixes https://github.com/flutter/flutter/issues/148983
2024-06-10 16:06:02 +00:00
flutter-pub-roller-bot
9a654cb5da
Roll pub packages (#149864)
This PR was generated by `flutter update-packages --force-upgrade`.
2024-06-07 00:22:25 +00:00
flutter-pub-roller-bot
27972ebb48
Roll pub packages (#149852)
This PR was generated by `flutter update-packages --force-upgrade`.
2024-06-06 22:35:15 +00:00
flutter-pub-roller-bot
50998a99f2
Roll pub packages (#149630)
This PR was generated by `flutter update-packages --force-upgrade`.
2024-06-06 18:08:49 +00:00
Matan Lurey
d1e17c338b
Remove unused code from an older test artifact. (#149746)
This does nothing. Let's send it to the void!
2024-06-05 21:07:08 +00:00
auto-submit[bot]
ec9965bd89
Reverts "Request focus if SemanticsAction.focus is sent to a focusable widget (#142942)" (#149741)
Reverts: flutter/flutter#142942
Initiated by: zanderso
Reason for reverting: Seems to have affected iOS platform view focus: https://ci.chromium.org/ui/p/flutter/builders/prod/Mac_ios%20native_platform_view_ui_tests_ios/10626/overview
Original PR Author: gspencergoog

Reviewed By: {yjbanov, goderbauer, chunhtai}

This change reverts the following previous change:
## Description

This causes the `Focus` widget to request focus on its focus node if the accessibility system (screen reader) focuses a widget via the `SemanticsAction.focus` action.

## Related Issues
 - https://github.com/flutter/flutter/issues/83809

## Tests
 - Added a test to make sure that focus is requested when `SemanticsAction.focus` is sent by the engine.
2024-06-05 14:54:18 +00:00
Greg Spencer
dd700e6d7c
Request focus if SemanticsAction.focus is sent to a focusable widget (#142942)
## Description

This causes the `Focus` widget to request focus on its focus node if the accessibility system (screen reader) focuses a widget via the `SemanticsAction.focus` action.

## Related Issues
 - https://github.com/flutter/flutter/issues/83809

## Tests
 - Added a test to make sure that focus is requested when `SemanticsAction.focus` is sent by the engine.
2024-06-05 00:42:59 +00:00
flutter-pub-roller-bot
99cf2b6e5a
Roll pub packages (#149617)
This PR was generated by `flutter update-packages --force-upgrade`.
2024-06-03 22:15:41 +00:00
engine-flutter-autoroll
86321ed229
Manual roll Flutter Engine from e19d7cde4686 to fa3065875564 (2 revisions) (#149436)
Manual roll requested by jacksongardner@google.com

e19d7cde46...fa30658755

2024-05-31 skia-flutter-autoroll@skia.org Manual roll Dart SDK from ef405fbe3917 to 2976c1694eed (6 revisions) (flutter/engine#53149)
2024-05-31 skia-flutter-autoroll@skia.org Roll Skia from b1e59e25696a to ce975ddfd9fb (1 revision) (flutter/engine#53147)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC jacksongardner@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2024-05-31 20:59:53 +00:00
Gray Mackall
d89ae48520
Manual pub roll w/ gradle lockfile regeneration (#149342)
Manual recreation of https://github.com/flutter/flutter/pull/148911

Entire PR is just the output of 
```
flutter update-packages --force-upgrade
```
followed by (run from the root of the flutter repo)
```
find . -type d -name 'android' | dart dev/tools/bin/generate_gradle_lockfiles.dart --no-gradle-generation --no-exclusion
```
2024-05-30 23:04:08 +00:00
engine-flutter-autoroll
697d99fae8
Manual roll Flutter Engine from 60968ee3bde7 to 8d5d14a1db95 (1 revision) (#149263)
Manual roll requested by jacksongardner@google.com

60968ee3bd...8d5d14a1db

2024-05-29 skia-flutter-autoroll@skia.org Manual roll Dart SDK from 641d61332238 to ef405fbe3917 (12 revisions) (flutter/engine#53089)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC jacksongardner@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2024-05-30 00:53:23 +00:00
Daco Harkes
1f16d9121c
[native_assets] Add support for link hooks (#148474)
This PR adds support invoking `link.dart` hooks.

Link hooks can add new assets. Link hooks can transform assets sent to link hook from build hooks.

This PR does not yet add support for getting tree-shake information in the link hooks. This is pending on defining the `resources.json` format (https://github.com/dart-lang/sdk/issues/55494).

Issue:

* https://github.com/flutter/flutter/issues/146263

## Implementation considerations

The build hooks could be run before Dart compilation and the link hooks after Dart compilation. (This is how it's done in Dart standalone.) However, due to the way the `Target`s are set up, this would require two targets and serializing and deserializing the `BuildResult` in between these. This would lead to more code but no benefits. Currently there is nothing that mandates running build hooks before Dart compilation.

## Testing

* The unit tests verify that the native_assets_builder `link` and `linkDryRun` would be invoked with help of the existing fake.
* The native assets integration test now also invokes an FFI call of a package that adds the asset during the link hook instead of the build hook.
  * In order to keep coverage of the `flutter create --template=package_ffi`, `flutter create` is still run and the extra dependency is added and an extra ffi call is added. (Open to alternative suggestions.)
2024-05-22 16:02:00 +00:00
Jackson Gardner
31fc593724
Fix the output of the CDN test. (#148730)
This test was outputting the "success" string multiple times, which is probably causing the harness to kill the app halfway through its cycle. I suspect this is causing some of the flakiness we've seen of this test. Instead, we should just output the string at the very end of the test, right before the app is done.
2024-05-21 18:07:23 +00:00
Nate
870c5541c3
switch expressions: finale (#148711)
### fixes #136139

<br>

<details open> <summary><b>getting sentimental in the PR description</b> (click to collapse)<br><br></summary>

The past 7 months have been quite the journey—I made some huge blunders and some huge accomplishments—a very fun time overall.

I really appreciate the people who took the time to perform code review for my refactoring shenanigans: **christopherfujino**, **andrewkolos**, **LongCatIsLooong**, **gspencergoog**, **loic-sharma**, **Piinks**, **bernaferrari**, **bartekpacia**, **bleroux**, **kevmoo**, **rakudrama**, **XilaiZhang**, **QuncCccccc**, **MominRaza**, and **victorsanni**.

And a huge shoutout to 2 individuals:
- @justinmc, for offering to sponsor me for commit access (words could not describe my excitement)
- @goderbauer, for being super duper proactive and consistent with code review

<br>

</details>

This pull request makes 13 "switch statements → switch expressions" PRs in total, reducing the LOC in this repo by **1,974**!

From now on, I'll make sure to request a test exemption for each refactoring PR 🙂
2024-05-21 16:18:05 +00:00
Michael Goderbauer
40b5bc3117
Manual roll camera dependency (#148426)
Supersedes https://github.com/flutter/flutter/pull/148245
2024-05-20 23:40:38 +00:00
Nate
76a07a1646
Implement new AnimationStatus getters (#148570)
PR #147801 introduced some convenient `AnimationStatus` getters, but I just realized that `AnimationController` now has 2 getters for the same thing: `isAnimating` and `isRunning`.

The intent of this pull request is to correct that mistake, and implement the getters in the appropriate places.
2024-05-20 17:43:03 +00:00
Nate
73ecc8a9b2
Reland "if chains → switch expressions" (#148634)
I did a goof a while back:

![late initialization error](https://github.com/flutter/flutter/assets/10457200/47dc423f-0dd0-4869-9a11-59cb7d1ea46e)

Now that [the bug is fixed](e9d403541f), I think we're good to re-implement the if-chains cleanup!

Related:

- https://github.com/flutter/flutter/pull/147793
- https://github.com/flutter/flutter/pull/148556
- https://github.com/flutter/flutter/issues/148548
2024-05-20 17:43:00 +00:00
Zachary Anderson
597462a3c4
Revert "if chains → switch expressions" (#148556)
Reverts flutter/flutter#147793

Introduced https://github.com/flutter/flutter/issues/148548.
2024-05-17 10:27:02 -07: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
flutter-pub-roller-bot
3c26c56ffa
Roll pub packages (#148148)
This PR was generated by `flutter update-packages --force-upgrade`.
2024-05-10 22:24:27 +00:00
Nate
4734d80f22
if chains → switch expressions (#147793)
Previous "if-chains" pull requests:
- https://github.com/flutter/flutter/pull/144905
- https://github.com/flutter/flutter/pull/144977
- https://github.com/flutter/flutter/pull/145194
- https://github.com/flutter/flutter/pull/146293
- https://github.com/flutter/flutter/pull/147472

<br>

I think this one should be enough to wrap things up!

fixes https://github.com/flutter/flutter/issues/144903

---------

Co-authored-by: Victor Sanni <victorsanniay@gmail.com>
2024-05-10 00:55:48 -06:00
Christopher Fujino
730d6d44b7
Don't pin package:macros (#148087)
Full context https://github.com/flutter/flutter/issues/148004

TL;DR

1. Because `package:macros` depends on `package:_macros` via [a Dart SDK
dependency](https://github.com/dart-lang/sdk/blob/main/pkg/macros/pubspec.yaml#L13);
and
2. `package:macros` exactly pins `package:_macros`; and
3. Each new version of `package:macros` will increment its exact pin of
`package:_macros`
([comment](https://github.com/flutter/flutter/issues/148004#issuecomment-2103099893));
and
4. The [flutter/flutter](https://github.com/flutter/flutter) repository
exactly pins the Dart SDK (via its exact pin on the
[flutter/engine](https://github.com/flutter/engine) repository

Therefore, the [flutter/flutter](https://github.com/flutter/flutter)
repository effectively pins both `package:macros` and `package:_macros`
already (as in, there exists only a single version of each that pub will
successfully be able to solve within the context of a particular Flutter
SDK).

Therefore, it is safe for
[flutter/flutter](https://github.com/flutter/flutter) repository to
*not* pin `package:macros`, which will allow engine -> framework rolls
that contain a new Dart SDK that contains a new `package:_macros`
version to land automatically, provided all tests pass.
2024-05-09 16:28:49 -07:00
flutter-pub-roller-bot
076e701f46
Roll pub packages (#148011)
This PR was generated by `flutter update-packages --force-upgrade`.
2024-05-09 04:45:28 +00:00
flutter-pub-roller-bot
b7a9e60850
Roll pub packages (#147995)
This PR was generated by `flutter update-packages --force-upgrade`.
2024-05-08 20:28:00 +00:00
Sam Rawlins
39d8492fb8
Tweak to fix context.mounted in dialog_demo (#147998)
Prepares for a fix to the `use_build_context_synchronously` lint (https://dart-review.googlesource.com/c/sdk/+/365541) that will complain about these unsafe usages.

The lint rule cannot tell that the `mounted` field is shorthand for `context.mounted`.
2024-05-08 19:56:22 +00:00
Danny Tuppeny
cea1d6f055
Unpin DDS and roll pub packages (#147925)
DDS was temporarily pinned to 4.1.0 because 4.2.0 triggered some test
failures (see https://github.com/flutter/flutter/pull/147250). Those
failures should be fixed by vm_service 14.2.2, so this unpins DDS and
rolls both of these packages (along with devtools_shared, which is a DDS
dependency).

(If the bot updates vm_service before this is done, I can rebase over
that will reduce the size of this PR to just a few files)
2024-05-08 10:35:28 +01:00
Michael Goderbauer
8796562d0a
Properly guard context access in then clauses (#147935)
Prepares for a fix to the `use_build_context_synchronously` lint (https://dart-review.googlesource.com/c/sdk/+/365541) that will complain about these unsafe usages.
2024-05-07 20:50:46 +00:00
Gray Mackall
d04edd1d7f
Add kotlinOptions jvmTarget to templates (#147326)
Adds jvmTarget to gradle templates. 

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

Interestingly, we already had this in many of our examples/tests, see search results here https://github.com/search?q=repo%3Aflutter%2Fflutter%20jvmTarget&type=code.
2024-05-07 17:32:10 +00:00
chunhtai
007faa980d
Reapply new PopScope API (#147607)
same as previous but with soft transition on modalroute

## Pre-launch Checklist

- [ ] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [ ] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [ ] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [ ] I signed the [CLA].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [ ] 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/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-05-07 09:04:49 -07:00
flutter-pub-roller-bot
c0ed9f6ff4
Roll pub packages (#147896)
This PR was generated by `flutter update-packages --force-upgrade`.
2024-05-06 23:36:21 +00:00
flutter-pub-roller-bot
d4b2e5d705
Roll pub packages (#147891)
This PR was generated by `flutter update-packages --force-upgrade`.
2024-05-06 22:39:58 +00:00
Jonah Williams
5230ec5ba4
[new gallery] Reisze gallery images (#147882)
Some cause of jank on both Skia and Impeller are these massive images. We should just resize them so that the noise is reduced and we can see other performance issues.

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

Tested: this is a test!
2024-05-06 19:20:32 +00:00
Greg Spencer
2e78ed0ff9
Allow explicit exclusion of packages from pinned packages in flutter update-packages --force-update (#147679)
## Description

This introduces a list of packages that we will explicitly not pin.  It is to be used for things where the package isn't actually published, but is a transitive dependency of another package included in the SDK.  This happens with the `macros` package, for instance, which depends on the private, unpublished, `_macros` package where the SDK does some tricky things to depend on it (it depends on "any", but ships it as part of the SDK).

Also ran `flutter update-packages --force-update` to update all of the pubspec files.

## Related Issues
 - Fixes #147656

## Tests
 - Added a test that makes sure that explicitly unpinned packages don't show up in the pinned list.
2024-05-02 01:16:54 +00:00
Yegor
f256f68831
[web] remove platform_messages_integration test (#147654)
This functionality is already fully covered by https://github.com/flutter/engine/blob/main/lib/web_ui/test/engine/platform_views/message_handler_test.dart

This might help with https://github.com/flutter/flutter/issues/146189 a little.
2024-05-01 21:12:01 +00:00
Kishan Dhankecha
2867ac7885
Added missing code block language in docs (#147481)
- added language for all code blocks
- replaced `bash` or `shell` with `sh` for consistency.
- added `sh` and `console` in the GitHub template link generator.
- updated test for GitHub template.
2024-05-01 14:44:27 +00:00
chunhtai
3e399c1578
Revert "add a new PopScope.onPopWithResultInvoke widget to replace Po… (#147597)
…pScope.onPopInvoke (#147016)"

This reverts commit 8031a3e30c.

Needs to migrate flutter_eval

## Pre-launch Checklist

- [ ] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [ ] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [ ] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [ ] I signed the [CLA].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [ ] 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/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-30 13:25:24 -07:00
Elliott Brooks
c1c7898b96
Bump dependencies in Flutter (#147546) 2024-04-29 15:53:25 -07:00
chunhtai
8031a3e30c
add a new PopScope.onPopWithResultInvoke widget to replace PopScope.onPopInvoke (#147016)
same as https://github.com/flutter/flutter/pull/139164, but make it a soft transition
2024-04-26 04:06:11 +00:00
flutter-pub-roller-bot
b4121a1867
Roll pub packages (#147094)
This PR was generated by `flutter update-packages --force-upgrade`.
2024-04-22 20:42:07 +00:00
Anis Alibegić
140edb9883
Fixed few typos (#147087)
Here's another PR with a couple of typos fixed. As you can see there was a typo in _fileReferenceI**n**dentifiers_, in class _ParsedProjectInfo._ Maybe we should do some check on that since I'm not sure if that property is used somewhere outside Flutter?
2024-04-22 16:49:19 +00:00
flutter-pub-roller-bot
16a2fe88d3
Roll pub packages (#147030)
This PR was generated by `flutter update-packages --force-upgrade`.
2024-04-19 23:15:37 +00:00
auto-submit[bot]
bb4c9b381e
Reverts "Add generic type for result in PopScope (#139164)" (#147015)
Reverts: flutter/flutter#139164
Initiated by: chunhtai
Reason for reverting: hard breaking change
Original PR Author: chunhtai

Reviewed By: {justinmc}

This change reverts the following previous change:
Adds a generic type and pop result to popscope and its friend.

The use cases are to be able to capture the result when the pop is called.

migration guide: https://github.com/flutter/website/pull/9872
2024-04-18 22:36:26 +00:00
chunhtai
7ee05a05ff
Add generic type for result in PopScope (#139164)
Adds a generic type and pop result to popscope and its friend.

The use cases are to be able to capture the result when the pop is called.

migration guide: https://github.com/flutter/website/pull/9872
2024-04-18 19:30:10 +00:00
Loïc Sharma
86135b7774
[macOS] Migrate @NSApplicationMain attribute to @main (#146848)
This migrates Flutter to use the `@main` attribute introduced in Swift 5.3. The `@NSApplicationMain` attribute is deprecated and will be removed in Swift 6. See: https://github.com/apple/swift-evolution/blob/main/proposals/0383-deprecate-uiapplicationmain-and-nsapplicationmain.md

This change is split into two commits:

1. a508d3e503 - This updates the macOS app template and adds a migration to replace `@NSApplicationMain` uses with `@main`. 
2. f43482786e - I ran `flutter run -d macos` on each Flutter macOS app in this repository to verify the app migrates and launches successfully.

Follow-up to https://github.com/flutter/flutter/pull/146707
Fixes https://github.com/flutter/flutter/issues/143044
2024-04-18 03:08:36 +00:00
Michael Goderbauer
63f917c36d
Bump meta to 1.14.0 (#146925)
Not sure why the auto-roller hasn't picked this up...
2024-04-17 15:25:51 -07:00
Derek Xu
cf26b1150f
Unpin frontend_server_client and roll packages (#146650) 2024-04-17 12:43:20 -04: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
flutter-pub-roller-bot
3d51fa9b9c
Roll pub packages (#146851)
This PR was generated by `flutter update-packages --force-upgrade`.
2024-04-16 23:50:16 +00:00
Loïc Sharma
194fefaa53
[iOS] Migrate @UIApplicationMain attribute to @main (#146707)
This migrates Flutter to use the `@main` attribute introduced in Swift 5.3. The `@UIApplicationMain` attribute is deprecated and will be removed in Swift 6. See: https://github.com/apple/swift-evolution/blob/main/proposals/0383-deprecate-uiapplicationmain-and-nsapplicationmain.md

This change is split into two commits:

1. ad18797428 - This updates the iOS app template and adds a migration to replace `@UIApplicationMain` uses with `@main`. 
2. 8ecbb2f29f - I ran `flutter run` on each Flutter iOS app in this repository to verify the app migrates and launches successfully.

Part of https://github.com/flutter/flutter/issues/143044
2024-04-16 22:13:03 +00:00
flutter-pub-roller-bot
4efdf190a8
Roll pub packages (#146842)
This PR was generated by `flutter update-packages --force-upgrade`.
2024-04-16 22:07:27 +00:00
flutter-pub-roller-bot
c06faf49e1
Roll pub packages (#146797)
This PR was generated by `flutter update-packages --force-upgrade`.
2024-04-16 06:44:25 +00:00
flutter-pub-roller-bot
e6a06913a3
Roll pub packages (#146782)
This PR was generated by `flutter update-packages --force-upgrade`.
2024-04-15 22:16:05 +00:00
Nate
2e748e8598
Implementing control flow collections (#146601)
This pull request aims for improved readability, based on issue #146600.

```dart
// before
Set<Color> _distinctVisibleColors() {
  final Set<Color> distinctVisibleColors = <Color>{};
  if (top.style != BorderStyle.none) {
    distinctVisibleColors.add(top.color);
  }
  if (right.style != BorderStyle.none) {
    distinctVisibleColors.add(right.color);
  }
  if (bottom.style != BorderStyle.none) {
    distinctVisibleColors.add(bottom.color);
  }
  if (left.style != BorderStyle.none) {
    distinctVisibleColors.add(left.color);
  }
  return distinctVisibleColors;
}

// after
Set<Color> _distinctVisibleColors() {
  return <Color>{
    if (top.style != BorderStyle.none) top.color,
    if (right.style != BorderStyle.none) right.color,
    if (bottom.style != BorderStyle.none) bottom.color,
    if (left.style != BorderStyle.none) left.color,
  };
}
```

Most of the repo should be covered in this PR (aside from `flutter_tools/`, since there was a lot going on in there).
2024-04-15 16:06:07 +00:00
flutter-pub-roller-bot
aac767e66a
Roll pub packages (#146704)
This PR was generated by `flutter update-packages --force-upgrade`.
2024-04-12 22:34:37 +00:00
Christopher Fujino
7a30d2b4ca
[flutter_tools] Fix conductor for package args roll (#146646)
The interface for `ArgResults` from `package:args` has added new fields. Change the implementations of these in the conductor to extend `Fake` so that these aren't analyzer errors.

This broke the pub roll here: https://github.com/flutter/flutter/pull/146642#issuecomment-2050169629
2024-04-12 21:38:03 +00:00
Jackson Gardner
9973673752
Support flutter run --wasm and flutter drive --wasm. (#146231)
This adds support for adding the `--wasm` flag to `flutter run` and `flutter drive`
* Emits errors if you attempt to use the skwasm renderer without the `--wasm` flag
* Emits errors if you try to use `--wasm` when not using a web device
* Uses the skwasm renderer by default if you pass `--wasm` and no `--web-renderer`
2024-04-12 19:27:26 +00:00
Chris Bracken
a34086a573
[Windows] Drop support for Windows 7/8 apps in template (#146668)
Since Flutter no longer supports Windows 7.x or 8.x, this eliminates support from the Windows app template. No tests to eliminate, since Windows 7 and 8 were "best-efforts" tier and untested.

Fixes: https://github.com/flutter/flutter/issues/140830
RFC: http://flutter.dev/go/flutter-drop-win7-2024
2024-04-12 01:07:20 +00:00
flutter-pub-roller-bot
6f9fff1f7c
Roll pub packages (#146515)
This PR was generated by `flutter update-packages --force-upgrade`.
2024-04-09 17:23:16 +00:00
flutter-pub-roller-bot
84c7298ba1
Roll pub packages (#146444)
This PR was generated by `flutter update-packages --force-upgrade`.
2024-04-08 18:48:19 +00:00
Gray Mackall
22e0c89f0a
Reland "Bump to AGP 8.1/Gradle 8.3 (almost) everywhere" (#146307)
Relands https://github.com/flutter/flutter/pull/146181.

Just 3 commits:
1. a revert of the revert
2. the fix described in https://github.com/flutter/flutter/pull/146181#issuecomment-2038238869
3. updating two postsubmit tests from Java 11 to 17, as that is required for this new AGP version.

I've verified that `flutter build apk --flavor paid --debug` fails in `dev/integration_tests/flavors/` with the error in ci without (2), and succeeds with it. 

I've also verified that the `dev/benchmarks/complex_layout` app builds successfully with Java 17.

That covers all the postsubmits that failed according [to the dashboard](https://flutter-dashboard.appspot.com/#/build).
2024-04-05 19:09:20 +00:00
flutter-pub-roller-bot
b0f52b5be2
Roll pub packages (#146348)
This PR was generated by `flutter update-packages --force-upgrade`.
2024-04-05 17:30:07 +00:00
flutter-pub-roller-bot
45deb49716
Roll pub packages (#146331)
This PR was generated by `flutter update-packages --force-upgrade`.
2024-04-05 10:42:30 +00:00
auto-submit[bot]
23ecc37ed2
Reverts "Bump to AGP 8.1/Gradle 8.3 (almost) everywhere (#146181)" (#146305)
Reverts: flutter/flutter#146181
Initiated by: LongCatIsLooong
Reason for reverting: https://ci.chromium.org/ui/p/flutter/builders/prod/Windows_android%20flavors_test_win/11086/overview
Original PR Author: gmackall

Reviewed By: {reidbaker, christopherfujino}

This change reverts the following previous change:
Bump almost all tests to AGP 8.1 and Gradle 8.3

Flutter gallery is excluded, because it uses discontinued plugins that in turn use old Gradle versions, and that prevents upgrading. Will take some extra work to figure out what to do there.

Should bump templates next

Entire PR generated with the lockfile generation script, except for:
1. changes within `dev/integration_tests/gradle_deprecated_settings/android/`, which must be done manually (and exclusion of the gallery for reason mentioned above).
2. Changes to many `AndroidManifest.xml` files to remove the `package` attribute and instead set that same value in the `build.gradle`, in the `namespace` attribute of the `android` closure (corresponds to an AGP behavior change, see  https://d.android.com/r/tools/upgrade-assistant/set-namespace).
3. Removes the use of the `battery` plugin in `android_embedding_v2_smoke_test` because the plugin is discontinued, unused, and blocks upgrading the AGP version for that app because the discontinued plugin itself uses a very old AGP version.
2024-04-04 21:07:17 +00:00
Gray Mackall
ab520c9849
Bump to AGP 8.1/Gradle 8.3 (almost) everywhere (#146181)
Bump almost all tests to AGP 8.1 and Gradle 8.3

Flutter gallery is excluded, because it uses discontinued plugins that in turn use old Gradle versions, and that prevents upgrading. Will take some extra work to figure out what to do there.

Should bump templates next

Entire PR generated with the lockfile generation script, except for:
1. changes within `dev/integration_tests/gradle_deprecated_settings/android/`, which must be done manually (and exclusion of the gallery for reason mentioned above).
2. Changes to many `AndroidManifest.xml` files to remove the `package` attribute and instead set that same value in the `build.gradle`, in the `namespace` attribute of the `android` closure (corresponds to an AGP behavior change, see  https://d.android.com/r/tools/upgrade-assistant/set-namespace).
3. Removes the use of the `battery` plugin in `android_embedding_v2_smoke_test` because the plugin is discontinued, unused, and blocks upgrading the AGP version for that app because the discontinued plugin itself uses a very old AGP version.
2024-04-04 20:11:09 +00:00
Gray Mackall
29ed214e7f
Set up Kotlin linting step in ci with ktlint (#143478)
Adds a kotlin linting step to the linux analyze check, using a version of [ktlint](https://github.com/pinterest/ktlint) hosted on [CIPD](https://chrome-infra-packages.appspot.com/p/flutter/ktlint/linux-amd64/+/version_1_1_1).

Configured to disallow trailing commas, because of (and now acting as a test for) https://github.com/flutter/flutter/pull/145718. Because of this configuration the PR also removes some trailing commas in some kotlin files.

Also checks in a baseline file.
2024-04-03 21:21:00 +00:00
Qun Cheng
69db714fbb
Update material_color_utilities package version to latest 0.11.1 (#145959)
This PR is to update material_color_utilities package version to the latest. `material_color_utilities/scheme/scheme_fruit_salad.dart` and `material_color_utilities/scheme/scheme_rainbow.dart` are exported after version 0.9.0.

Once this PR is merged, we don't need to explicitly import these two files like the change in PR #144805, which breaks some dependencies in `Google testing`.
2024-04-03 02:16:13 +00:00
Polina Cherkasova
bca1d6ad1f
Upgrade leak_tracker. (#145997) 2024-03-29 12:31:52 -07:00
Polina Cherkasova
1a2f34ab5b
Upgrade leak_tracker. (#145940) 2024-03-29 02:39:17 +00:00
David Iglesias
9786682492
[web] Add BackgroundIsolateBinaryMessenger.ensureInitialized to web. (#145786)
This PR makes the static API of the `BackgroundIsolateBinaryMessenger` consistent between its web and IO implementations.

This way, multi-platform applications will compile for the web when using the `ensureInitialized` method (even though it'll throw at runtime, like the `instance` getter, because isolates are not supported on the web).

### Issues

* Fixes: https://github.com/flutter/flutter/issues/145260
2024-03-26 23:51:23 +00:00
Christopher Fujino
385bec0abb
Roll pub packages and regenerate gradle lockfiles (#145727)
Example failing devicelab build https://ci.chromium.org/ui/p/flutter/builders/prod/Linux_pixel_7pro%20platform_views_scroll_perf__timeline_summary/2980/overview

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

Supercedes https://github.com/flutter/flutter/pull/145564
2024-03-26 22:07:06 +00:00
Michael Goderbauer
eaf509aaf8
Eliminate more window singleton usages (#145560)
These usages in strings slipped through the initial clean-up.
2024-03-21 20:59:25 +00:00
Jackson Gardner
31209d04ff
flutter test --wasm support (#145347)
* Adds support for `flutter test --wasm`.
  * The test compilation flow is a bit different now, so that it supports compilers other than DDC. Specifically, when we run a set of unit tests, we generate a "switchboard" main function that imports each unit test and runs the main function for a specific one based off of a value set by the JS bootstrapping code. This way, there is one compile step and the same compile output is invoked for each unit test file.
* Also, removes all references to `dart:html` from flutter/flutter.
* Adds CI steps for running the framework unit tests with dart2wasm+skwasm
  * These steps are marked as `bringup: true`, so we don't know what kind of failures they will result in. Any failures they have will not block the tree at all yet while we're still in `bringup: true`. Once this PR is merged, I plan on looking at any failures and either fixing them or disabling them so we can get these CI steps running on presubmit.

This fixes https://github.com/flutter/flutter/issues/126692
2024-03-21 20:08:07 +00:00
auto-submit[bot]
fd18e5ce48
Reverts "Roll pub packages (#145509)" (#145550)
Reverts: flutter/flutter#145509
Initiated by: yusuf-goog
Reason for reverting: Failing builds, blocking tree.
Original PR Author: flutter-pub-roller-bot

Reviewed By: {fluttergithubbot}

This change reverts the following previous change:
This PR was generated by `flutter update-packages --force-upgrade`.
2024-03-21 17:32:48 +00:00
flutter-pub-roller-bot
5545c95df7
Roll pub packages (#145509)
This PR was generated by `flutter update-packages --force-upgrade`.
2024-03-21 16:16:07 +00:00
flutter-pub-roller-bot
61b3f975a0
Roll pub packages (#145476)
This PR was generated by `flutter update-packages --force-upgrade`.
2024-03-21 00:09:24 +00:00
goodmost
3236957f02
chore: fix some comments (#145397)
fix some comments
2024-03-19 17:00:24 +00:00
Loïc Sharma
8d54abfc22
Roll pub packages manually (#145170)
The automated roll failed as a test needs to be updated: https://github.com/flutter/flutter/pull/145167

Fixes: https://github.com/flutter/flutter/issues/139861
2024-03-15 14:12:22 +00:00
Nate
b9e537336f
Turning if chains into shorter switch statements (#144977)
This pull request is part of the effort to solve issue #144903.

In the past, my efforts to reduce line length involved refactoring away from switch statements, but unlike [yesterday's PR](https://github.com/flutter/flutter/pull/144905), this one is full of switch statements that make things more concise!
2024-03-13 17:16:17 +00:00
Jackson Gardner
3c30e3cb20
Flutter Web Bootstrapping Improvements (#144434)
This makes several changes to flutter web app bootstrapping.
* The build now produces a `flutter_bootstrap.js` file.
  * By default, this file does the basic streamlined startup of a flutter app with the service worker settings and no user configuration.
  * The user can also put a `flutter_bootstrap.js` file in the `web` subdirectory in the project directory which can have whatever custom bootstrapping logic they'd like to write instead. This file is also templated, and can use any of the tokens  that can be used with the `index.html` (with the exception of `{{flutter_bootstrap_js}}`, see below).
* Introduced a few new templating tokens for `index.html`:
  * `{{flutter_js}}` => inlines the entirety of `flutter.js`
  * `{{flutter_service_worker_version}}` => replaced directly by the service worker version. This can be used instead of the script that sets the `serviceWorkerVersion` local variable that we used to have by default.
  * `{{flutter_bootstrap_js}}` => inlines the entirety of `flutter_bootstrap.js` (this token obviously doesn't apply to `flutter_bootstrap.js` itself).
* Changed `IndexHtml` to be called `WebTemplate` instead, since it is used for more than just the index.html now.
* We now emit warnings at build time for certain deprecated flows:
  * Warn on the old service worker version pattern (i.e.`(const|var) serviceWorkerVersion = null`) and recommends using `{{flutter_service_worker_version}}` token instead
  * Warn on use of `FlutterLoader.loadEntrypoint` and recommend using `FlutterLoader.load` instead
  * Warn on manual loading of `flutter_service_worker.js`.
* The default `index.html` on `flutter create` now uses an async script tag with `flutter_bootstrap.js`.
2024-03-12 22:41:26 +00:00
Gray Mackall
d5896d5ede
Manually roll pub packages (#145005)
Manual takeover of https://github.com/flutter/flutter/pull/145003, to include some gradle lockfile changes.
2024-03-12 19:53:57 +00:00
Nate
26e379e0fc
Refactoring if chains into switch statements (#144905)
Based on issue #144903, this PR aims to bring the codebase more in line with the [Flutter repo style guide](https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#avoid-using-if-chains-or--or--with-enum-values):

> #### Avoid using `if` chains or `?:` or `==` with enum values

<br>

This change unfortunately increases the total line length, but it also improves readability.
2024-03-11 23:04:57 +00:00
Polina Cherkasova
a04fe3169a
Upgrade vm_service. (#144845) 2024-03-08 17:09:07 -08:00
Gray Mackall
9973771cc3
Update android templates to use target sdk 34 (#144641)
We should always target the newest, and 34 is the newest. This isn't a requirement yet (like it is for 33+) but presumably it will be made required in the nearish future.
2024-03-06 19:15:07 +00: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
Qun Cheng
1349c591cc
Remove toggleableActiveColor from ThemeData (#144178)
This PR is to remove deprecated ThemeData.toggleableActiveColor.

These parameters are made obsolete in https://github.com/flutter/flutter/pull/97972.
Part of https://github.com/flutter/flutter/pull/111080
2024-02-29 20:58:11 +00:00
Bruno Leroux
e92bca3ff5
[flutter_tools] Update external link in Android manifest template (#144302)
## Description

This PR simplifies one external link in a commented section of the Android manifest template.

## Related Issue

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

## Tests

Documentation only PR.
2024-02-29 06:47:19 +00:00
Qun Cheng
0d8eafb006
Reland "Reland - Introduce tone-based surfaces and accent color add-ons - Part 2" (#144273) 2024-02-28 13:55:50 -08:00
auto-submit[bot]
2eee0b5750
Reverts "Reland - Introduce tone-based surfaces and accent color add-ons - Part 2 (#144001)" (#144262)
Reverts flutter/flutter#144001

Initiated by: Piinks

Reason for reverting: Failing goldens at the tip of tree

Original PR Author: QuncCccccc

Reviewed By: {HansMuller}

This change reverts the following previous change:
Original Description:
Reverts flutter/flutter#143973

This is a reland for #138521 with an updated g3fix(cl/605555997). Local test: cl/609608958.
2024-02-27 22:04:18 +00:00
Qun Cheng
871d59221c
Reland - Introduce tone-based surfaces and accent color add-ons - Part 2 (#144001)
Reverts flutter/flutter#143973

This is a reland for #138521 with an updated g3fix(cl/605555997). Local test: cl/609608958.
2024-02-27 20:21:14 +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
Victoria Ashworth
00229827ab
Retry button tap in [FlutterUITests testFlutterViewWarm] (#143967)
Attempting to fix https://github.com/flutter/flutter/issues/142125.
2024-02-23 16:13:21 +00:00
Qun Cheng
4715216c01
Revert "Introduce tone-based surfaces and accent color add-ons - Part 2" (#143973)
Reverts flutter/flutter#138521
2024-02-22 14:51:28 -08:00
Gray Mackall
3ae71f5c43
Delete local.properties that shouldn't have been pushed (#143774)
This file shouldn't be in version control

## 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].
- [ ] 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

Co-authored-by: Gray Mackall <mackall@google.com>
2024-02-20 11:55:51 -08:00
Qun Cheng
a2c7ed95d1
Introduce tone-based surfaces and accent color add-ons - Part 2 (#138521)
This PR is to introduce 19 new color roles and deprecate 3 color roles in `ColorScheme`.
**Tone-based surface colors** (7 colors): 
* surfaceBright
* surfaceDim
* surfaceContainer
* surfaceContainerLowest
* surfaceContainerLow
* surfaceContainerHigh
* surfaceContainerHighest

**Accent color add-ons** (12 colors):
* primary/secondary/tertiary-Fixed
* primary/secondary/tertiary-FixedDim
* onPrimary/onSecondary/onTertiary-Fixed
* onPrimary/onSecondary/onTertiary-FixedVariant

**Deprecated colors**:
* background -> replaced with surface
* onBackground -> replaced with onSurface
* surfaceVariant -> replaced with surfaceContainerHighest

Please checkout this [design doc](https://docs.google.com/document/d/1ODqivpM_6c490T4j5XIiWCDKo5YqHy78YEFqDm4S8h4/edit?usp=sharing) for more information:)

![Screenshot 2024-01-08 at 4 56 51 PM](https://github.com/flutter/flutter/assets/36861262/353cdb4c-6ba9-4435-a518-fd3f67e415f0)
2024-02-20 19:01:50 +00:00
Jonah Williams
a22c2305b3
[devicelab] retain prior events for flutter gallery. (#143554)
Capture first frames in gallery benchmarks

Calling https://github.com/flutter/flutter/issues/143404 fixed, since all the full app benchmarks capture the start now.

Fixes https://github.com/flutter/flutter/issues/143404
2024-02-16 01:13:01 +00:00
Jonah Williams
2d4f5a65c4
[devicelab] introduce new old gallery. (#143486)
Fixes https://github.com/flutter/flutter/issues/143482

This brings in the gallery more or less as is:

* Removed localizations
* Ensure tests still run (locally verified, will switch CI later).
* Removed deferred components
* Fixup pubspec
2024-02-15 20:01:14 +00:00
Michael Goderbauer
3f09b23338
cleanup now-irrelevant ignores for deprecated_member_use (#143403)
Follow-up to https://github.com/flutter/flutter/pull/143347.
2024-02-14 21:08:25 +00:00
Gray Mackall
c61dc2a586
Format all kotlin according to ktlint (#143390)
Entire pr generated with [ktlint](https://github.com/pinterest/ktlint) --format. First step before enabling linting as part of presubmit for kotlin changes.
2024-02-14 17:58:18 +00:00
Jonah Williams
295eeaf100
[devicelab] retain first frame data in certain integration tests. (#143419)
Part of https://github.com/flutter/flutter/issues/143404

We currently drop the first N frames of all benchmarks. For the app based benchmarks (not microbenchmarks) this is harmful as we miss first time initialization costs in our CI.

Still need to do this with flutter/gallery, but that lives in a different repo.
2024-02-14 03:58:58 +00:00
Jackson Gardner
5a9fa1e7bf
Dual compile reland (#143262)
This is an attempt at a reland of https://github.com/flutter/flutter/pull/141396

The main changes here that are different than the original PR is fixes to wire up the `flutter test` command properly with the web renderer.
2024-02-13 20:02:10 +00:00
Gray Mackall
8ba086a277
[Re-re-land] Enforce a policy on supported Gradle, Java, AGP, and KGP versions (#143341)
This is a direct revert of (the revert of (the reland of (the policy pr))): https://github.com/flutter/flutter/pull/143132. 

The only change is:
1. to put a conditional all on one line, because the packages repository has a test that uses an old flutter project to make sure nothing regresses. The old project uses an old gradle version, and the old gradle version bundles an old groovy version, and the old groovy version has a bug where lines that start with `&&` don't always work: https://issues.apache.org/jira/browse/GROOVY-7218 (I enjoy that the revert reason ends up providing another strong justification to go forward with the policy). Also thanks to @reidbaker for pointing out this bug.
2. I also made a slight formatting change to the messages that print when out of the support bounds, which I think looks slightly better.

I tested this with on a branch that included a revert of https://github.com/flutter/flutter/pull/142008, and was able to recreate the failure and verify that it was resolved by 1).
2024-02-13 15:44:17 +00:00
Reid Baker
ace3e58f0a
Revert "[Re-land] Enforce a policy on supported Gradle, Java, AGP, and KGP versions" (#143314)
Reverts flutter/flutter#143132
2024-02-12 18:04:05 +00:00
LongCatIsLooong
bc49cf8091
Fix text painter longest line resizing logic for TextWidthBasis.longestLine (#143024)
Fixes https://github.com/flutter/flutter/issues/142309.
2024-02-10 23:39:20 +00:00
engine-flutter-autoroll
d385d027f1
Roll Flutter Engine from 8c521eb24171 to 6a3b0216ff5b (4 revisions) (#143251)
8c521eb241...6a3b0216ff

2024-02-09 30870216+gaaclarke@users.noreply.github.com [Impeller] cleaned up StrokePathGeometry and removed runtime polymorphism (flutter/engine#50506)
2024-02-09 ditman@gmail.com [web] Fix HtmlViewEmbedder.dispose (flutter/engine#50482)
2024-02-09 skia-flutter-autoroll@skia.org Roll Dart SDK from 03130d49f214 to 444f7a422da4 (6 revisions) (flutter/engine#50502)
2024-02-09 jonahwilliams@google.com [Impeller] improve performance of polyline and stroke generation by reducing allocation and lambda usage. (flutter/engine#50379)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC chinmaygarde@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2024-02-09 23:20:57 +00:00
Polina Cherkasova
b48dfca382
Upgrade leak_tracker. (#143236) 2024-02-09 14:41:22 -08:00
Gray Mackall
4b0abc7771
[Re-land] Enforce a policy on supported Gradle, Java, AGP, and KGP versions (#143132)
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.
2024-02-08 22:10:58 +00:00
Jackson Gardner
2efeeb47bc
Revert Dual Web Compile changes (#143175)
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.
2024-02-08 21:45:09 +00:00
Bartek Pacia
deaa600204
Reland "Update gradle lockfiles template (#140115)" (#143081)
Trying to reland #140115 which I had to revert in #142889 because [it broke the tree](https://github.com/flutter/flutter/pull/140115#issuecomment-1925774719).

In this PR I fixed the post-submit following tests:
2024-02-08 16:22:15 +00:00
Gray Mackall
120a01ccd2
Restore log dumps for gradle OOM crashes, and set a value for MaxMetaspaceSize (#143085)
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).
2024-02-07 19:25:39 +00:00