Commit Graph

39 Commits

Author SHA1 Message Date
Michael Goderbauer
5491c8c146
Auto-format Framework (#160545)
This auto-formats all *.dart files in the repository outside of the
`engine` subdirectory and enforces that these files stay formatted with
a presubmit check.

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

---------

Co-authored-by: Kate Lovett <katelovett@google.com>
Co-authored-by: LongCatIsLooong <31859944+LongCatIsLooong@users.noreply.github.com>
2024-12-19 20:06:21 +00:00
Matan Lurey
4ff6698838
Report usage of deferred-components to analytics. (#159307)
Towards https://github.com/flutter/flutter/issues/159212.

/cc @jtmcdole

---------

Co-authored-by: Andrew Kolos <andrewrkolos@gmail.com>
2024-11-26 21:01:20 +00:00
Matan Lurey
ed553d10cf
Avoid using platform ProcessInfo.maxRss in test. (#158526)
Closes https://github.com/flutter/flutter/issues/157629.

Avoids failures in the style:
```txt
00:37 +4597 ~3 -1: /Users/matanl/Developer/flutter/packages/flutter_tools/test/commands.shard/permeable/build_appbundle_test.dart: analytics logs success [E]                                                                                                        
  Expected: contains Event:<{"eventName":"flutter_command_result","eventData":{"commandPath":"create","result":"success","commandHasTerminal":false,"maxRss":147013632}}>
    Actual: [
              Event:{"eventName":"command_usage_values","eventData":{"workflow":"create","commandHasTerminal":false,"createProjectType":"app","createAndroidLanguage":"kotlin","createIosLanguage":"swift"}},
              Event:{"eventName":"flutter_command_result","eventData":{"commandPath":"create","result":"success","commandHasTerminal":false,"maxRss":143261696}},
              Event:{"eventName":"timing","eventData":{"workflow":"flutter","variableName":"create","elapsedMilliseconds":527,"label":"success"}},
              Event:{"eventName":"command_usage_values","eventData":{"workflow":"appbundle","commandHasTerminal":false,"buildAppBundleTargetPlatform":"android-arm,android-arm64,android-x64","buildAppBundleBuildMode":"release"}},
              Event:{"eventName":"flutter_command_result","eventData":{"commandPath":"appbundle","result":"success","commandHasTerminal":false,"maxRss":147013632}},
              Event:{"eventName":"timing","eventData":{"workflow":"flutter","variableName":"appbundle","elapsedMilliseconds":10,"label":"success"}}
            ]
     Which: does not contain Event:<{"eventName":"flutter_command_result","eventData":{"commandPath":"create","result":"success","commandHasTerminal":false,"maxRss":147013632}}>
```

I am guessing <https://api.flutter.dev/flutter/dart-io/ProcessInfo/maxRss.html> is not guaranteed to be stable while running, and as a result is not. This stabilizes the value for a test that I believe does not care about getting the "real" value anyway.
2024-11-13 18:03:58 +00:00
Andrew Kolos
5103d75743
[tool] Remove some usages of deprecated usage package (#151359)
Partially addresses https://github.com/flutter/flutter/issues/150575 and https://github.com/flutter/flutter/issues/150665

Will require a g3fix.
2024-07-09 18:17:21 +00:00
Reid Baker
b09a015ff5
Add aab as alias for appbundle (#143855)
- **Fix #143778 add aab as alias to appbundle**

Fixes #143778
2024-02-21 18:19:41 +00:00
Elias Yishak
2b218fd1fc
Migrate command usage values (#139383)
Related to the tracker issue:
- https://github.com/flutter/flutter/issues/128251

This PR migrates the `Usage.command` static method that sent custom dimensions for each command (if applicable). The screenshot below shows the different places where the `usageValues` getter is overwritten to return the necessary custom dimensions for that command.

<img width="285" alt="image" src="https://github.com/flutter/flutter/assets/42216813/e32d5100-0e17-4a4d-8f21-327a8c113a19">
2023-12-07 16:12:03 +00:00
Christopher Fujino
8ca7d7d136
Stop recommending android sdk root (#136296)
Fixes https://github.com/flutter/flutter/issues/117245
2023-10-11 21:04:59 +00:00
Andrew Kolos
80a4f9b159
Reland "[tool] Move Java functions to their own file" (#126577)
Relands #126086, which was reverted by #126569.
2023-05-20 06:29:21 +00:00
Andrew Kolos
5b2f658ff5
Revert "[tool] Move Java functions to their own file" (#126569)
Reverts flutter/flutter#126086.

This PR changed the interfaces of some classes, namely `AndroidSdk`, and deleted a global.

These classes had custom overrides in g3 that were not updated with a g3fix, so this PR has broken tests. See https://b.corp.google.com/issues/281945232 (non-public link)
2023-05-11 17:06:57 +00:00
Andrew Kolos
0a63cd70f1
[tool] Move Java functions to their own file (#126086)
This is the first step in unifying Java-finding logic across the tool. If curious, see #126029 for an example of what all the changes will probably entail.

Moves java-related functionality like `AndroidSdk.findJavaHome` to a new class, `Java`.

See tracking issue https://github.com/flutter/flutter/issues/126126 for more.
2023-05-11 04:32:25 +00:00
chunhtai
55502fc36a
Add vmservice for android build options (#123034)
https://github.com/flutter/flutter/issues/120408
2023-04-18 18:16:09 +00:00
Christopher Fujino
3736274a6d
Revert "[flutter_tools] Remove sound null safety flag (#123031)" (#123280)
Revert "[flutter_tools] Remove sound null safety flag (#123031)"
2023-03-22 22:53:49 +00:00
Christopher Fujino
f4c3facfdd
Revert "Revert "[flutter_tools] Remove sound null safety flag (#120936)" (#122909)" (#123031)
[flutter_tools] Remove sound null safety flag #2
2023-03-20 22:32:07 +00:00
Christopher Fujino
f6bc147c91
Revert "[flutter_tools] Remove sound null safety flag (#120936)" (#122909)
This reverts commit 7c3088cf22.
2023-03-17 11:31:48 -07:00
Christopher Fujino
7c3088cf22
[flutter_tools] Remove sound null safety flag (#120936)
[flutter_tools] Remove sound null safety flag
2023-03-17 17:48:35 +00:00
Jesús S Guerrero
530324d232
Build command dependency injection (#114383)
* update flutter build command

* update tests

* fix analyze suggestions
2022-11-08 23:38:10 +00:00
Liam Appelbe
089d955156
Null safety migration of packages/flutter_tools/test/commands.shard/permeable (#110710)
* Migrate packages/flutter_tools/test/commands.shard/permeable

* Fix upgrade_test

* Chris's comments
2022-09-06 10:22:09 -07:00
Jenn Magder
9e88fe328e
Remove globals_null_migrated.dart, move into globals.dart (#92861) 2021-11-01 17:18:03 -07:00
Lau Ching Jun
2acd0007d6
Refactor CustomDimensions in analytics to be type safe (#82531) 2021-05-18 20:29:03 -07:00
Jenn Magder
23404dfa74
Remove flutter_command dependency from reporting library (#80159) 2021-04-12 16:45:03 -07:00
Jenn Magder
a2f67720ef
Migrate test/src/common to null safety (#79907) 2021-04-06 22:55:03 -07:00
Sam Rawlins
3e4320847a
Remove "unnecessary" imports in test/commands.shard. (#78665) 2021-04-06 11:14:01 -07:00
Jenn Magder
8ddc27e607
Split globals.dart into null sound and unsound libraries (#79016) 2021-03-31 16:55:20 -07:00
Jenn Magder
06a20be5a0
Remove MockBuildSystem from generate_synthetic_packages_test (#77983) 2021-03-12 07:55:01 -08:00
Sam Rawlins
dc1bdcc757
Remove "unnecessary" imports. (#77559) 2021-03-09 13:09:30 -08:00
Jonah Williams
945e0df104
[flutter_tools] remove several AndroidSdk Mocks (#77264) 2021-03-04 12:24:03 -08:00
Jonah Williams
b678d0adec
[flutter_tools] remove globals and mocks from android gradle builder and test (#76416) 2021-02-19 21:07:43 -08:00
Jenn Magder
6fec8b3679
Remove mockito from windows_device_test (#76355) 2021-02-18 19:26:02 -08:00
Jonah Williams
65599e2825
[flutter_tools] use less path manipulation in the Android SDK (#75930) 2021-02-16 13:54:44 -08:00
Jonah Williams
021311ed8a
Revert "[flutter_tools] move process manager into tool (#75350)" (#75639)
This reverts commit 8b6baae44c.
2021-02-08 09:21:46 -08:00
Jonah Williams
8b6baae44c
[flutter_tools] move process manager into tool (#75350)
Our current top crasher is an unclear error when ProcessManager fails to resolve an executable path. To fix this, we'd like to being adjusting the process resolution logic and adding more instrumentation to track failures. In order to begin the process, the ProcessManager has been folded back into the flutter tool
2021-02-04 13:19:11 -08:00
Jenn Magder
6ecb8cbcfa
Replace MockUsage with TestUsage (#74946) 2021-01-28 18:49:04 -08:00
Jonah Williams
74bd7b6f6d
[flutter_tools] opt all flutter tool libraries and tests out of null safety. (#74832)
* opt out the flutter tool

* oops EOF

* fix import

* Update tool_backend.dart

* Update daemon_client.dart

* fix more
2021-01-27 15:17:53 -08:00
Jonah Williams
7c618758bb
[flutter_tools] delegate first run message re-display to new class, only if changed (#73353) 2021-01-05 18:44:04 -08:00
Emmanuel Garcia
8dd0de7f58
Relands: Migrate template to Gradle 6.7 and AGP 4.1.0 (#71446) 2020-12-01 19:01:09 -08:00
Amir Hardon
7df04fdbd3
Revert "Migrate template to Gradle 6.7 and AGP 4.1.0 (#70808)" (#71096)
This reverts commit 8e73bab94c.
2020-11-23 12:27:36 -08:00
Emmanuel Garcia
8e73bab94c
Migrate template to Gradle 6.7 and AGP 4.1.0 (#70808) 2020-11-20 13:05:35 -08:00
Jenn Magder
6a2bc2617e
Replace ANDROID_HOME user messages with ANDROID_SDK_ROOT (#59867) 2020-06-22 18:43:04 -07:00
Jenn Magder
95edf28150
Move create project build tests to permeable subshard (#58645) 2020-06-03 17:41:15 -07:00