Commit Graph

4899 Commits

Author SHA1 Message Date
Andrew Kolos
d3e0e03e2e
rename AssetManifest.bin (#126077)
Fixes #124883. Will require a g3fix.

Renames `AssetManifest.bin` to `AssetManifest.smcbin` (madeup extension for "Standard Message Codec binary").
2023-05-15 15:45:09 +00:00
Tomasz Gucio
99c7e9f088
Add spaces after flow control statements (#126320) 2023-05-15 11:07:30 +02:00
stuartmorgan
aa230140e7
Add namespace to Android plugin templates (#126354)
Adds the `namespace` property necessary for AGP 8 compatibility to the plugin templates, with the conditional logic to ensure that it doesn't break AGP <4.2, so that new plugins will be maximally compatible.

Part of https://github.com/flutter/flutter/issues/125181
2023-05-12 22:16:06 +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
Michael Goderbauer
42d9a2b3fa
Sync lints (#126316)
Sync lints with https://github.com/dart-lang/linter/blob/master/example/all.yaml and enable `implicit_reopen` and `type_literal_in_constant_pattern` (which have no violations). Also contains some clean-up work towards enabling `matching_super_parameters`, which is not quite ready yet due to its handling of "private" arguments.
2023-05-11 13:27:51 +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
Kevin Moore
1b831a2c70
tool/web: correctly log all options to web wasm compile (#126379)
Filtering on 'true' omitted non-bool values
2023-05-10 19:26:08 +00:00
fzyzcjy
742a1b49e9
Fix that flutter test does not understand concurrency (#125942)
Close https://github.com/flutter/flutter/issues/125940

I will add tests if this PR looks roughly OK :)

The fix mainly mimics https://github.com/flutter/flutter/pull/115160 - just remove the default argument.

p.s. I ran into this bug when wanting to set concurrency in my dart_test.yaml for one set of my tests which I need to be executed without parallalization.
2023-05-08 20:25:00 +00:00
Loïc Sharma
472a0ab314
[Tool] Output help on 'flutter pub' (#126211)
This change makes `flutter pub` show the help usage:

```
PS > flutter pub
Commands for managing Flutter packages.

Global options:
-h, --help                  Print this usage information.
-v, --verbose               Noisy logging, including all shell commands executed.
                            If used with "--help", shows hidden options. If used with "flutter
                            doctor", shows additional diagnostic information. (Use "-vv" to force
                            verbose logging in those cases.)
-d, --device-id             Target device id or name (prefixes allowed).
    --version               Reports the version of this tool.
    --suppress-analytics    Suppress analytics reporting for the current CLI invocation.
    --disable-telemetry     Disable telemetry reporting when this command runs.

Usage: flutter pub <subcommand> [arguments]
-h, --help    Print this usage information.

Available subcommands:
  add         Add a dependency to pubspec.yaml.
  cache       Work with the Pub system cache.
  deps        Print package dependencies.
  downgrade   Downgrade packages in a Flutter project.
  get         Get the current package's dependencies.
  global      Work with Pub global packages.
  login       Log into pub.dev.
  logout      Log out of pub.dev.
  outdated    Analyze dependencies to find which ones can be upgraded.
  pub         Pass the remaining arguments to Dart's "pub" tool.
  publish     Publish the current package to pub.dartlang.org.
  remove      Removes a dependency from the current package.
  run         Run an executable from a package.
  test        Run the "test" package.
  token       Manage authentication tokens for hosted pub repositories.
  upgrade     Upgrade the current package's dependencies to latest versions.
  uploader    Manage uploaders for a package on pub.dev.
  version     Print Pub version.

Run "flutter help" to see global options.
```

Previously it showed an error message:

```
PS > flutter pub
Missing subcommand for "flutter pub".

Run 'flutter -h' (or 'flutter <command> -h') for available flutter commands and options.
```

Addresses https://github.com/flutter/flutter/issues/110025
2023-05-08 17:22:10 +00:00
Jackson Gardner
4439fd41d9
Always use --concurrency=1 for web tests. (#126179)
This should fix https://github.com/flutter/flutter/issues/126178

When we don't pass a `--concurrency` flag to the test package, it uses a default based on the number of cores that are on the machine. However, the web test platform itself serializes all these requests anyway, which can lead to the test package timing out. This is because from the test package's perspective, it has already started the loading process on a number of suites which are simply waiting for other test suites to compile and run. The ones that wait the longest can run up against the test packages 12 minute timeout for loading a given suite, even though they haven't actually started to try to load.

Instead, we should always pass `--concurrency=1` to the test package so that it doesn't attempt to start loads concurrently in the first place.
2023-05-08 16:33:15 +00:00
Elias Yishak
38cac91057
Add --verbose flags for flakey tests (#126162)
Related to:
- https://github.com/flutter/flutter/issues/125512

Adding verbose flags to get printed out on error to help debug the cause of the flakey test
2023-05-08 15:59:28 +00:00
Reid Baker
0fdddd67f9
Test AGP 8.0 using java 17 (#125323)
- Update Gradle/AGP version and add namespace plus dependencies. 

https://github.com/flutter/flutter/issues/125181
2023-05-08 15:02:31 +00:00
Elias Yishak
0d5875274b
Clearer text about what happens with --disable-telemetry + enable-telemetry command (#125995)
Fixes:
- https://github.com/flutter/flutter/issues/124411

This PR is cleaning up the `--disable-telemetry` help message to make it clear that opting out will opt out of all telemetry collection for flutter and dart commands. It is also adding the opposite flag `--enable-telemetry` which will enable telemetry collection
2023-05-08 13:01:25 +00:00
chunhtai
78ed142f30
Rename iosdeeplinksettings to iosuniversallinksettings (#126173)
as title
2023-05-05 20:02:27 +00:00
Kevin Moore
f9d455134a
tool: replace top-level functions with enum properties (#126167) 2023-05-05 19:10:07 +00:00
chunhtai
b00f1c4599
Adding vmservice to get iOS app settings (#123156)
fixes https://github.com/flutter/flutter/issues/120405
2023-05-04 22:14:11 +00:00
Kevin Moore
529b919f09
tool-web-wasm: make wasm-opt an "option" instead of a "flag" (#126035)
Allows controlling a broader set of variables than just on/off.

Also make wasm-opt "full" the default
2023-05-04 22:07:12 +00:00
Kevin Moore
5816da8074
[tool] consistently use environment (not globals) in targets/web.dart (#125937)
Also update the order of args to commands so that testing has less repeated "stuff"
2023-05-04 00:47:06 +00:00
Kevin Moore
0f9d66aad6
tool: use switch expressions (#125930) 2023-05-03 21:00:08 +00:00
gmackall
c12488a707
[Reland] Add migrator to upgrade gradle version when conflict with Android Studio bundled Java version is detected (#125836)
This is an attempt to reland https://github.com/flutter/flutter/pull/124085.

Differences from this attempt and the last: 
1. Adds a check for null android studio versions and a test for this case.
2. Wraps the migrate code in a try-catch [per the suggestion here](https://github.com/flutter/flutter/pull/125728/files#r1181747899).

Old PR description:
This PR adds an android project migrator that checks the version of android studio and the version of gradle for conflicts, and upgrades to 7.4 if a conflict is detected. For more detail about the particular conflict, see https://github.com/flutter/flutter/issues/122376.

The PR also upgrades older gradle versions being used in integration testing to 7.4.

Fixes/related to: https://github.com/flutter/flutter/issues/122376 and https://github.com/flutter/flutter/issues/123636
2023-05-03 21:00:06 +00:00
Kevin Moore
4bd9bcd7cb
tool: DRY up DepfileService (#125922) 2023-05-03 20:54:51 +00:00
Elias Yishak
9160c6e7f1
Adding printOnFailure for result of process (#125910)
Adding a `printOnFailure` call into the flakey test to help debug the cause for future failures.

- Reference issue: https://github.com/flutter/flutter/issues/125512
2023-05-03 14:50:10 +00:00
LouiseHsu
c9b132d079
Allow .xcworkspace and .xcodeproj to be renamed from default name 'Runner' (#124533)
Adds the ability to rename Runner.xcodeproj and Runner.xcworkspace - fixes https://github.com/flutter/flutter/issues/9767.

To rename a project:
1. Open Runner.xcodeproj in Xcode
2. In the left panel, left click "Show File Inspector" 
<img width="441" alt="Screenshot 2023-04-17 at 11 41 07 PM" src="https://user-images.githubusercontent.com/36148254/232692957-8743742d-c3ef-42e5-833f-dff31aeb2b6a.png">
3. In the right panel, the name of the project, "Runner", should be visible under "Identity and Type". Change the name and press enter.
<img width="299" alt="Screenshot 2023-04-17 at 11 40 43 PM" src="https://user-images.githubusercontent.com/36148254/232693315-b6a71165-f5e3-4a0f-8954-2f3eee5b67cf.png">
4. A wizard should pop up. Click Rename.
<img width="573" alt="Screenshot 2023-04-17 at 11 44 01 PM" src="https://user-images.githubusercontent.com/36148254/232693381-bb9cf026-2a75-4844-b42d-ae0036ae9fdd.png">
To rename the workspace:

1. Make sure Xcode is closed.
2. Rename the .xcworkspace to your new name.

If you also renamed the project

&nbsp; 3. Reopen the .xcworkspace in Xcode. If the selected project is the old name and in red, update it to match the new project name.

Tests for schemeFor were changed as with Xcode 14, in some cases the scheme will be renamed along with the project. Thus we will get the best match scheme for either the project name, or the default name Runner. However if a flavor is present, the scheme should always match the flavor.
2023-05-03 05:52:58 +00:00
Jenn Magder
1861ac470a
Migrate Xcode projects last version checks to Xcode 14.3 (#125827)
1. Add iOS and macOS migration to mark "last upgraded" Xcode version to 14.3 to prevent `Update to recommended settings` warning.
2. Update iOS and macOS templates to same.
3. Update iOS template to set `BuildIndependentTargetsInParallel` to YES as suggested.  I didn't add a migration for this since it seems like a minor optimization and I don't think it's worth a potentially botched/corrupted migration.
4. Run all example/integration test project to see migrator work.
5. Add some missing test projects to the build shard since I noticed they were missing and I had to build those manually outside `SHARD=build_tests`.

Fixes https://github.com/flutter/flutter/issues/125817
See https://github.com/flutter/flutter/pull/90304 for Xcode 13 example.
2023-05-02 00:06:33 +00:00
gmackall
db7196c52c
Revert "Add migrator to upgrade gradle version when conflict with And… (#125813)
…roid Studio bundled Java version is detected (#124085)"

This reverts commit eba2a520b4.
2023-05-01 18:47:01 +00:00
Andrew Kolos
a27cb145c7
[tools] fix expect calls in FakeCommand (#125783)
Fixes #125782.

Would be nice to figure out a way to put this under test.
2023-05-01 18:21:36 +00:00
Andrew Kolos
9dbd6e6139
[tools] Apply Android Studio version detection logic to explicitly configured installation directory (flutter config --android-studio-dir) (#125596)
Fixes #121468 (when considered along with https://github.com/flutter/flutter/pull/125247).

This applies the pre-existing Android Studio version detection logic to the install configured with `flutter config android-studio-dir`.
2023-05-01 07:10:20 +00:00
Anas
512e2c3fd5
fix package template create platform folders (#125292)
`package` template should not create platform folders. This happen cause by default all platforms are supported and tools didn't distinguish between package and other template, which makes all platforms are true for below code,
d186792c00/packages/flutter_tools/lib/src/project.dart (L374-L380)

fixes: #119844 which make #116320 makes invalid. As for why tools created deprecated `Android Embedding`, `appManifestFile` does not exist for `package` template, which make below code to trigger,
https://github.com/flutter/flutter/blob/master/packages/flutter_tools/lib/src/project.dart#L768-L770

This does not happen with `module` and `plugin` as it have specific condition check for them. I try to reproduce it with `app` template but didn't succeed
2023-04-29 00:00:08 +00:00
Jenn Magder
6b73885e2d
Increase Xcode minimum version to 14 (#125639)
Looks like CocoaPods 1.12.1 is incompatible with < Xcode 14 due to https://github.com/CocoaPods/CocoaPods/pull/11828 (see https://github.com/flutter/flutter/issues/123890 for context).

Bump the minimum Xcode version allowed by tooling to 14, released September 2022.

```
[!] Xcode - develop for iOS and macOS (Xcode 13.4)
    ✗ Flutter requires Xcode 14 or higher.
      Download the latest version or update via the Mac App Store.
```

Fixes https://github.com/flutter/flutter/issues/125286.
Previous bump at #97746.
2023-04-27 23:17:56 +00:00
gmackall
eba2a520b4
Add migrator to upgrade gradle version when conflict with Android Studio bundled Java version is detected (#124085)
This PR adds an android project migrator that checks the version of android studio and the version of gradle for conflicts, and upgrades to 7.4 if a conflict is detected. For more detail about the particular conflict, see https://github.com/flutter/flutter/issues/122376.

The PR also upgrades older gradle versions being used in integration testing to 7.4. 

Fixes/related to: https://github.com/flutter/flutter/issues/122376 and https://github.com/flutter/flutter/issues/123636
2023-04-27 23:07:50 +00:00
Christopher Fujino
4ff505c861
[flutter_tools] more debugging for timeouts in break_on_framework_exceptions test (#125584)
Better debugging to investigate: https://github.com/flutter/flutter/issues/125241

When the `test/integration.shard/break_on_framework_exceptions_test.dart` test times out, log out verbose logging to give clues as to why it did not complete.

From one local run it looks like the test runner is failing to load a test file (when I checked the path locally, the file was there, and re-running the `flutter test ...` invocation succeeded--in that the app threw an exception):

```
14:12 +26 -1: breaks when StatefulWidget.build throws [E]
  Timed out launching `flutter test`
  package:matcher                                                        fail
  test/integration.shard/break_on_framework_exceptions_test.dart 623:11  _timeoutAfter.<fn>

250s            Spawning flutter [test, --disable-service-auth-codes, --machine, --start-paused, test/test.dart] in /tmp/flutter_break_on_framework_exceptions.GUJDAZ

251s <=stdout=  {"protocolVersion":"0.1.1","runnerVersion":null,"pid":25763,"type":"start","time":0}

<=stdout=  {"suite":{"id":0,"platform":"vm","path":"/tmp/flutter_break_on_framework_exceptions.GUJDAZ/test/test.dart"},"type":"suite","time":0}

<=stdout=  {"test":{"id":1,"name":"loading /tmp/flutter_break_on_framework_exceptions.GUJDAZ/test/test.dart","suiteID":0,"groupIDs":[],"metadata":{"skip":false,"skipReason":null},"line":null,"column":null,"url":null},"type":"testStart","time":0}

258s <=stdout=  {"testID":1,"error":"Exception: the Dart compiler exited unexpectedly.","stackTrace":"package:flutter_tools/src/base/common.dart 10:3  throwToolExit\npackage:flutter_tools/src/compile.dart 813:13    DefaultResidentCompiler._compile.<fn>\ndart:async/zone.dart 1391:47                     _rootRun\ndart:async/zone.dart 1301:19                     _CustomZone.run\ndart:async/zone.dart 1209:7                      _CustomZone.runGuarded\ndart:async/stream_impl.dart 392:13               _BufferingStreamSubscription._sendDone.sendDone\ndart:async/stream_impl.dart 402:7                _BufferingStreamSubscription._sendDone\ndart:async/stream_impl.dart 291:7                _BufferingStreamSubscription._close\ndart:async/stream_transformers.dart 87:11        _SinkTransformerStreamSubscription._close\ndart:async/stream_transformers.dart 21:11        _EventSinkWrapper.close\ndart:convert/string_conversion.dart 241:11       _StringAdapterSink.close\ndart:convert/line_splitter.dart 141:11           _LineSplitterSink.close\ndart:async/stream_transformers.dart 132:24       _SinkTransformerStreamSubscription._handleDone\ndart:async/zone.dart 1391:47                     _rootRun\ndart:async/zone.dart 1301:19                     _CustomZone.run\ndart:async/zone.dart 1209:7                      _CustomZone.runGuarded\ndart:async/stream_impl.dart 392:13               _BufferingStreamSubscription._sendDone.sendDone\ndart:async/stream_impl.dart 402:7                _BufferingStreamSubscription._sendDone\ndart:async/stream_impl.dart 291:7                _BufferingStreamSubscription._close\ndart:async/stream_transformers.dart 87:11        _SinkTransformerStreamSubscription._close\ndart:async/stream_transformers.dart 21:11        _EventSinkWrapper.close\ndart:convert/string_conversion.dart 241:11       _StringAdapterSink.close\ndart:convert/string_conversion.dart 295:20       _Utf8ConversionSink.close\ndart:convert/chunked_conversion.dart 78:18       _ConverterStreamEventSink.close\ndart:async/stream_transformers.dart 132:24       _SinkTransformerStreamSubscription._handleDone\ndart:async/zone.dart 1391:47                     _rootRun\ndart:async/zone.dart 1301:19                     _CustomZone.run\ndart:async/zone.dart 1209:7                      _CustomZone.runGuarded\ndart:async/stream_impl.dart 392:13               _BufferingStreamSubscription._sendDone.sendDone\ndart:async/stream_impl.dart 402:7                _BufferingStreamSubscription._sendDone\ndart:async/stream_impl.dart...

<=stdout=  {"testID":1,"error":"Failed to load \"/tmp/flutter_break_on_framework_exceptions.GUJDAZ/test/test.dart\": Compilation failed for testPath=/tmp/flutter_break_on_framework_exceptions.GUJDAZ/test/test.dart","stackTrace":"","isFailure":false,"type":"error","time":7518}

<=stdout=  {"testID":1,"result":"error","skipped":false,"hidden":false,"type":"testDone","time":7521}

<=stdout=  {"count":1,"time":7526,"type":"allSuites"}

<=stdout=  {"success":false,"type":"done","time":7529}

259s            Process exited (1)

371s            Expecting test.startedProcess event
[+    95] <=stdout=  {"suite":{"id":0,"platform":"vm","path":"/tmp/flutter_break_on_framework_exceptions.GUJDAZ/test/test.dart"},"type":"suite","time":0}
[+    95] <=stdout=  {"test":{"id":1,"name":"loading /tmp/flutter_break_on_framework_exceptions.GUJDAZ/test/test.dart","suiteID":0,"groupIDs":[],"metadata":{"skip":false,"skipReason":null},"line":null,"column":null,"url":null},"type":"testStart","time":0}
[+  7600] <=stdout=  {"testID":1,"error":"Exception: the Dart compiler exited unexpectedly.","stackTrace":"package:flutter_tools/src/base/common.dart 10:3  throwToolExit\npackage:flutter_tools/src/compile.dart 813:13    DefaultResidentCompiler._compile.<fn>\ndart:async/zone.dart 1391:47                     _rootRun\ndart:async/zone.dart 1301:19                     _CustomZone.run\ndart:async/zone.dart 1209:7                      _CustomZone.runGuarded\ndart:async/stream_impl.dart 392:13               _BufferingStreamSubscription._sendDone.sendDone\ndart:async/stream_impl.dart 402:7                _BufferingStreamSubscription._sendDone\ndart:async/stream_impl.dart 291:7                _BufferingStreamSubscription._close\ndart:async/stream_transformers.dart 87:11        _SinkTransformerStreamSubscription._close\ndart:async/stream_transformers.dart 21:11        _EventSinkWrapper.close\ndart:convert/string_conversion.dart 241:11       _StringAdapterSink.close\ndart:convert/line_splitter.dart 141:11           _LineSplitterSink.close\ndart:async/stream_transformers.dart 132:24       _SinkTransformerStreamSubscription._handleDone\ndart:async/zone.dart 1391:47                     _rootRun\ndart:async/zone.dart 1301:19                     _CustomZone.run\ndart:async/zone.dart 1209:7                      _CustomZone.runGuarded\ndart:async/stream_impl.dart 392:13               _BufferingStreamSubscription._sendDone.sendDone\ndart:async/stream_impl.dart 402:7                _BufferingStreamSubscription._sendDone\ndart:async/stream_impl.dart 291:7                _BufferingStreamSubscription._close\ndart:async/stream_transformers.dart 87:11        _SinkTransformerStreamSubscription._close\ndart:async/stream_transformers.dart 21:11        _EventSinkWrapper.close\ndart:convert/string_conversion.dart 241:11       _StringAdapterSink.close\ndart:convert/string_conversion.dart 295:20       _Utf8ConversionSink.close\ndart:convert/chunked_conversion.dart 78:18       _ConverterStreamEventSink.close\ndart:async/stream_transformers.dart 132:24...

Expecting test.startedProcess event is taking longer than usual...
```
2023-04-27 18:37:59 +00:00
Dan Field
fc20983686
Bump the default minSdkVersion to 19 (#125515)
See https://docs.flutter.dev/reference/supported-platforms

I don't expect this to break anything, but if it does we can revert and figure out what else needs to happen first.

Without this change, engine changes upstream will get flagged in default flutter created apps.
2023-04-27 17:26:28 +00:00
Tae Hyung Kim
5c44b1df0f
Refactor "gen-l10n" command to use same code path when "l10n.yaml" is present or not present (#125429)
I think this is a long needed change to the `gen-l10n` command.
Essentially, the arguments to `flutter gen-l10n` can be provided by two
different methods: via command line arguments or via the `l10n.yaml`
file. The existence of a `l10n.yaml` file causes the latter approach to
take precedence.

However, currently, there's several differences in how the two
approaches are handled, and most of the default arguments are all over
the place, causing unexpected issues such as #120457 or #120023.

This PR refactors the command so that
* `LocalizationOptions` are more consistent with the actual argument
names/yaml options.
* All default values are determined in `LocalizationOptions`'s
constructor (or in `argParser.addOption(...)` in the case a boolean
value needs to be explicitly true).
* New `parseLocalizationsOptionsFromCommand` function to parse
arguments.
* Parse `LocalizationOptions` at the beginning of `runCommand()` and
pass it to `generateLocalizations`.

Fixes #120023.
2023-04-26 11:49:25 -07:00
Tae Hyung Kim
8be335f24c
Handle dollar signs properly when generating localizations (#125514)
Currently, the code doesn't properly handle strings which contain dollar signs. The return expression for the generated localization function is computed by `generateReturnExpr` which concatenates several strings, which are either interpolated placeholders, interpolated function calls, or normal strings, but we didn't properly escape dollar signs before sending normal strings to `generateReturnExpr`.

Fixes #125461.
2023-04-25 22:52:24 +00:00
Kevin Moore
7d9f2082f1
tool: Move cdKey to CustomDimensionsEnum (#125335) 2023-04-24 22:59:20 +00:00
Kevin Moore
702f0144e0
[tool,web] track web-renderer, and Wasm build args in analytics (#125336)
Addresses part of https://github.com/flutter/flutter/issues/125164
2023-04-21 23:09:00 +00:00
Christopher Fujino
1561b65812
add gradle error handler for when the remote ssl host terminates handshake process (#125270)
Will fix transient network failures as in: https://github.com/flutter/flutter/issues/125108#issuecomment-1516519929
2023-04-21 21:59:10 +00:00
Michael Thomsen
dc481b23d1
Cleanup flutter config output (#122384) 2023-04-21 16:45:43 +02:00
Andrew Kolos
cf76b24df1
When searching for the JDK bundled with an unrecognized version of Android Studio, assume the version to be the latest (#125247)
Fixes #125246 by restoring the intended behavior of #101862. That is, when searching for a JDK and we encounter an Android Studio version we don't recognize, assume it to be the latest version `flutter` is aware of.

Also does some light refactoring in the tests, like using test objects instead of referencing `globals`.
2023-04-21 01:12:59 +00:00
Nate Bosch
dcfd35f8a7
Remove uses of deprecated test_api imports (#124732)
Most of these imports were never appropriate. The `test_api` package was never intended for use in `_test.dart` files.
Where possible move imports to `matcher`, otherwise move them to `test` or `flutter_test`.

Leave uses of `test_api` from `flutter_test` library code.
2023-04-20 20:55:28 +00:00
Ben Konyi
0d023144d9
Fix race condition in flutter test when passing --serve-observatory (#123556)
`flutter test` wasn't awaiting the `_serveObservatory` request which was
causing a race condition in the `flutter test should respect
--serve-observatory` test in `test/integration.general/test_test.dart`.

Related to https://github.com/flutter/flutter/issues/123516
2023-04-20 13:46:33 -04:00
Christopher Fujino
800175af6b
[flutter_tools] make overall_experience_test resilient to extraneous pub output (#125172)
use `containsAllInOrder` so that pub output doesn't cause htis test to fail, as in https://ci.chromium.org/p/flutter/builders/try/Linux%20tool_tests_general/22929?
2023-04-20 17:31:58 +00:00
Kevin Moore
f5b0f0a2b6
Report web compiler used with buildEventSettings (#125092)
Fixes https://github.com/flutter/flutter/issues/125085
2023-04-19 22:19:21 +00:00
Victoria Ashworth
48bb3c0bc9
Use term wireless instead of network (#124232)
Rename variables, update comments, etc from `network` to `wireless` to keep it more uniform.

Also, move non-overriden messages related to device selection into the file they're used.

Part 7 in breakdown of https://github.com/flutter/flutter/pull/121262.
2023-04-19 19:59:11 +00:00
Elias Yishak
ca3a900d5d
[reland] Update helper message for --suppress-analytics (#125145)
Relanding: https://github.com/flutter/flutter/pull/124810

Fixes: https://github.com/flutter/flutter/issues/124808
2023-04-19 18:51:08 +00:00
godofredoc
03d725620a
Revert "Update helper message for --suppress-analytics" (#125141)
Reverts flutter/flutter#124810
2023-04-19 16:43:29 +00:00
Elias Yishak
3476b96652
Update helper message for --suppress-analytics (#124810)
Fixes: https://github.com/flutter/flutter/issues/124808
2023-04-19 14:00:20 +00:00
Tae Hyung Kim
b6c7df447d
l10n.yaml's nullable-getter option should default to true (#124353)
Currently, nullable-getter defaults to false when l10n.yaml is not present, which is not the same behavior as when an l10n.yaml file is present and nullable-getter is not set.

Fixes #120457.
2023-04-18 18:42:07 +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
Bartek Pacia
e99eb40222
Update usage of standalonepub executable in flutter_tools testing docs (#124898)
Just found this while trying to run the integration test shard of `flutter_tools` locally :)
2023-04-17 23:34:23 +00:00
Andrew Kolos
68ec71f46c
[flutter_tools] Remove Version.unknown (#124771)
Fixes #124756 by removing the concept of `Version.unknown`.

`Version` fields that needed the ability to represent an unknown version have been made nullable. Assigning `null` to them represents an unknown version.
2023-04-15 19:56:41 +00:00
Jackson Gardner
2269dc10b3
Add option to run wasm-opt on module output. (#124831)
This fixes https://github.com/flutter/flutter/issues/124159

Adds the command line argument `--wasm-opt` to optimize the web assembly output.
2023-04-14 17:19:21 +00:00
Andrew Kolos
2cd768b893
[flutter_tools] Reorganize android_studio_test.dart (#124834)
[flutter_tools] Reorganize android_studio_test.dart
2023-04-14 03:20:35 +00:00
Jenn Magder
44fe615c5c
Remove Finder extended attributes in build target before code signing iOS frameworks (#123896)
Remove Finder extended attributes in build target before code signing iOS frameworks
2023-04-14 02:26:15 +00:00
Kevin Moore
3bc07c1cef
flutter-tool, web: update HTML template serviceWorkerVersion to be const (#124826)
flutter-tool, web: update HTML template serviceWorkerVersion to be const
2023-04-14 02:01:21 +00:00
Kevin Moore
76e587bf78
flutter-tool: enum cleanup (#124760)
flutter-tool: enum cleanup
2023-04-14 01:55:05 +00:00
Reid Baker
2723266466
i123643 print java version gradle (#123644)
#123643
- Add task to projects evaluated by flutter.gradle that will print the
java version.
- Add integration test for the existence of javaVersion and the expected
format.
- Add gradle util to get the gradlew version for a specific platform
(gradlew everywhere but windows).

Why does this code need to exist? 
Figuring out what version of java is used by flutter/gradle is done in a
few different ways that are not always aligned.
See this issue https://github.com/flutter/flutter/issues/122609 ,
this issue https://github.com/flutter/flutter/issues/121501 this feature
request https://github.com/flutter/flutter/issues/106416

As examples of why assuming the java version is dangerous. 
This task is code flutter can build upon and is the version gradle is
using to build no matter how it is configured.



## 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] All existing and new tests are passing.

---------

Co-authored-by: Mitchell Goodwin <58190796+MitchellGoodwin@users.noreply.github.com>
Co-authored-by: Greg Spencer <gspencergoog@users.noreply.github.com>
Co-authored-by: Victoria Ashworth <vashworth@google.com>
Co-authored-by: Christopher Fujino <christopherfujino@gmail.com>
Co-authored-by: Jackson Gardner <jacksongardner@google.com>
Co-authored-by: Rydmike <m.rydstrom@gmail.com>
Co-authored-by: keyonghan <54558023+keyonghan@users.noreply.github.com>
Co-authored-by: chunhtai <47866232+chunhtai@users.noreply.github.com>
Co-authored-by: Taha Tesser <tessertaha@gmail.com>
Co-authored-by: Ben Konyi <bkonyi@google.com>
Co-authored-by: engine-flutter-autoroll <engine-flutter-autoroll@skia.org>
Co-authored-by: hellohuanlin <41930132+hellohuanlin@users.noreply.github.com>
Co-authored-by: Danny Tuppeny <danny@tuppeny.com>
Co-authored-by: Chris Bracken <chris@bracken.jp>
Co-authored-by: Kate Lovett <katelovett@google.com>
Co-authored-by: Michael Goderbauer <goderbauer@google.com>
Co-authored-by: Elias Yishak <42216813+eliasyishak@users.noreply.github.com>
Co-authored-by: Christopher Fujino <fujino@google.com>
2023-04-13 18:13:58 -04:00
Elliott Brooks
a3b85ba9a9
[flutter_tools] Disable flaky output_web_test test case (#124257)
[flutter_tools] Disable flaky `output_web_test` test case
2023-04-13 20:38:07 +00:00
Camille Simon
f582b56e45
Update re-thrown error for incompatible Java/Gradle versions to include migration guide (#124327)
Update re-thrown error for incompatible Java/Gradle versions to include migration guide
2023-04-12 22:15:07 +00:00
Elias Yishak
51b23bc961
Update runner to handle logic for both analytics packages (#124606)
Update runner to handle logic for both analytics packages
2023-04-12 19:34:11 +00:00
Jackson Gardner
ac9b501dc2
Remove the old canvaskit artifacts to not confuse the web runner. (#124641)
Remove the old canvaskit artifacts to not confuse the web runner.
2023-04-12 16:57:41 +00:00
Kevin Moore
895879c195
flutter_tools: Flutter Web CLI cleanup (#124564)
flutter_tools: Flutter Web CLI cleanup
2023-04-12 00:01:15 +00:00
Kevin Moore
ecf6a66387
Add omit-type-checks flag for wasm builds (#124341)
Add omit-type-checks flag for wasm builds
2023-04-11 00:38:35 +00:00
Lau Ching Jun
c8b38b20bf
Debounce the proxied connection over proxied devices. (#124540)
Debounce the proxied connection over proxied devices.
2023-04-10 23:20:01 +00:00
Lau Ching Jun
5923ae41d2
Allow daemon to start DDS remotely when proxied devices are used. (#124061)
Allow daemon to start DDS remotely when proxied devices are used.
2023-04-10 20:21:07 +00:00
Jackson Gardner
07b89dada4
Add support to the flutter tool to compile against the skwasm renderer (#124296)
Add support to the flutter tool to compile against the skwasm renderer
2023-04-10 15:52:40 +00:00
Reid Baker
7a791b5dbf
Update getGradleVersion to ignore commented out lines (#124260)
https://github.com/flutter/flutter/issues/123917
Missed feedback from https://github.com/flutter/flutter/pull/123916 

- Handle commented out lines in gradle-wrapper.properties

This is 1 of 2 prs to handle missed feedback. Formatting will be done in
the second whereas this one captures a weakness missed in the last pr.

## 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] All existing and new tests are passing.
2023-04-07 12:45:37 -04:00
Kevin Moore
97d5cd5ecc
flutter tool: log dart2wasm vs dart2js as appropriate during build (#124331)
flutter tool: log dart2wasm vs dart2js as appropriate during build
2023-04-06 20:49:26 +00:00
Albert Wolszon
509c2ddef3
Add decimalPatternDigits to gen-l10n valid NumberFormats (#122682)
`intl` [0.18.0 added](https://pub.dev/packages/intl/changelog#0180) a
[`NumberFormat.decimalPatternDigits`](https://pub.dev/documentation/intl/latest/intl/NumberFormat/NumberFormat.decimalPatternDigits.html)
pattern that allows `decimalDigits` param.

Fixes #122785

## 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.
- [ ] ~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] 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
2023-04-06 11:13:47 -07:00
Zachary Anderson
822632b510
Revert "flutter tool: log dart2wasm vs dart2js as appropriate during build" (#124305)
Revert "flutter tool: log dart2wasm vs dart2js as appropriate during build"
2023-04-06 06:04:50 +00:00
Kevin Moore
929a5bd08c
flutter tool: log dart2wasm vs dart2js as appropriate during build (#124165)
flutter tool: log dart2wasm vs dart2js as appropriate during build
2023-04-06 05:34:18 +00:00
Kevin Moore
1045c3d081
flutter_tool: add and use WebCompilerConfig (#124183)
flutter_tool: add and use WebCompilerConfig
2023-04-06 05:30:23 +00:00
Jenn Magder
385728e7fd
Add tools test for buildWeb compilation (#124179)
Add tools test for buildWeb compilation
2023-04-05 22:57:07 +00:00
Camille Simon
87392c214b
[Android] Catch and rethrow Java/Gradle incompatibility error (#124084)
Catches and re-throws Gradle error indicating that the Gradle version is
incompatible with the Java version that Flutter is using to tell users
how to fix the issue.

Related issue: https://github.com/flutter/flutter/issues/122376

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

<!-- 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: Reid Baker <hamilton.reid.baker@gmail.com>
Co-authored-by: Christopher Fujino <fujino@google.com>
Co-authored-by: Christopher Fujino <christopherfujino@gmail.com>
2023-04-05 14:39:55 -07:00
Andrew Kolos
ec13058a1e
Normalize Java SDK (JDK) location logic across the tool (#124233)
Normalize Java SDK (JDK) location logic across the tool
2023-04-05 20:36:50 +00:00
Reid Baker
2383400fe0
Add Java-Gradle-AGP validation to flutter analyze (#123916)
https://github.com/flutter/flutter/issues/123917

Doc covering a broad set of issues related to android studio updating. 

https://docs.google.com/document/d/1hTXkjbUrBnXgu8NQsth1c3aEqo77rWoEj8CcsQ39wwQ/edit?pli=1#

Specifically this pr: 
- Adds new functions to find a projects AGP, Gradle and java versions,
and tests.
- Adds new functions that take versions and parse if the versions are
compatible with each other, and tests.
- Adds validator for `flutter analyze --suggestions` that evaluates the
java/gradle/agp versions and checks if they are compatible, and
integration test.
- Updates the version of gradle used by
dev/integration_tests/flutter_gallery/ to the minimum supported by java
18 so that the integration tests pass (It is unknown why the java
version is 18.9 instead of 11)
- Moves `isWithinVersionRange` to version.dart, and tests. 
- Adds FakeAndroidStudio to fakes to be used in multiple tests but does
not remove existing copies.

Metrics will be included as part of the definition of done for this bug
but not as part of this cl. It is already too big.

Known work still left in this pr: 
* Understand why analyze integration tests are failing. 


Example output if Java and gradle are not compatible: 
```
┌───────────────────────────────────────────────────────────────────┐
│ General Info                                                      │
│ [✓] App Name: espresso_example                                    │
│ [✓] Supported Platforms: android                                  │
│ [✓] Is Flutter Package: yes                                       │
│ [✓] Uses Material Design: yes                                     │
│ [✓] Is Plugin: no                                                 │
│ [✗] Java/Gradle/Android Gradle Plugin:                            │
│                                                                   │
│ Incompatible Java/Gradle versions.                                │
│                                                                   │
│ Java Version: 17.0.6, Gradle Version: 7.0.2                       │
│                                                                   │
│ See the link below for more information.                          │
│ https://docs.gradle.org/current/userguide/compatibility.html#java │
│                                                                   │
└───────────────────────────────────────────────────────────────────┘
```
Example output if Gradle and AGP are not compatible
```
┌─────────────────────────────────────────────────────────────────────────────┐
│ General Info                                                                │
│ [✓] App Name: espresso_example                                              │
│ [✓] Supported Platforms: android                                            │
│ [✓] Is Flutter Package: yes                                                 │
│ [✓] Uses Material Design: yes                                               │
│ [✓] Is Plugin: no                                                           │
│ [✗] Java/Gradle/Android Gradle Plugin: Incompatible Gradle/AGP versions.    │
│                                                                             │
│ Gradle Version: 7.0.2, AGP Version: 7.4.2                                   │
│                                                                             │
│ Update gradle to at least "7.5".                                            │
│ See the link below for more information:                                    │
│ https://developer.android.com/studio/releases/gradle-plugin#updating-gradle │
│                                                                             │
│ Incompatible Java/Gradle versions.                                          │
│                                                                             │
│ Java Version: 17.0.6, Gradle Version: 7.0.2                                 │
│                                                                             │
│ See the link below for more information:                                    │
│ https://docs.gradle.org/current/userguide/compatibility.html#java           │
│                                                                             │
└─────────────────────────────────────────────────────────────────────────────┘
```
Example output if Java/Gradle/Agp are not compatible. 
```

┌─────────────────────────────────────────────────────────────────────────────┐
│ General Info                                                                │
│ [✓] App Name: espresso_example                                              │
│ [✓] Supported Platforms: android                                            │
│ [✓] Is Flutter Package: yes                                                 │
│ [✓] Uses Material Design: yes                                               │
│ [✓] Is Plugin: no                                                           │
│ [✗] Java/Gradle/Android Gradle Plugin: Incompatible Gradle/AGP versions.    │
│                                                                             │
│ Gradle Version: 7.0.2, AGP Version: 7.4.2                                   │
│                                                                             │
│ Update gradle to at least "7.5".                                            │
│ See the link below for more information:                                    │
│ https://developer.android.com/studio/releases/gradle-plugin#updating-gradle │
│                                                                             │
│ Incompatible Java/Gradle versions.                                          │
│                                                                             │
│ Java Version: 17.0.6, Gradle Version: 7.0.2                                 │
│                                                                             │
│ See the link below for more information:                                    │
│ https://docs.gradle.org/current/userguide/compatibility.html#java           │
│                                                                             │
└─────────────────────────────────────────────────────────────────────────────┘
```

Commit messages
- Add function to gradle_utils.dart that gets the gradle version from
wrapper or system and add a test for each situation
- Add method to get agp version, add method to validate agp against
gradle version, update documentation, add tests for agp validation.
- Update dart doc for validateGradleAndAgp to describe where the info
came from and corner case behavior, create function to validate java and
gradle and hardcode return to false
- Fill out and test java gradle compatibility function in gradle_utils
- Hook up java gradle evaluateion to hasValidJavaGradleAgpVersions with
hardcoded java version
- Add java --version output parsing and tests
- Add getJavaBinary test
- Update comment in android_sdk for mac behavior with java_home -v

## 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.
2023-04-05 14:36:05 -04:00
Elias Yishak
a32f0bb7a0
Add analytics package + setTelemetry method attached (#124015)
The first of many PRs for transitioning to `package:unified_analytics`.
This PR is only focused on disabling and enabling telemetry via the
`flutter config --[no-]analytics` flag

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

## 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] 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: Christopher Fujino <fujino@google.com>
Co-authored-by: Christopher Fujino <christopherfujino@gmail.com>
2023-04-05 14:08:56 -04:00
Michael Goderbauer
daaa32bc06
Add CustomDimensions.commandRunIsTest (#124135) 2023-04-05 09:30:36 -07:00
Chris Bracken
e5fc6f65b9
[macOS] Remigrate principal class to NSApplication (#124173)
In #122336 we migrated the principal class from NSApplication to
FlutterApplication in the app Info.plist. We removed the need for
FlutterApplication in https://github.com/flutter/engine/pull/40929. This
reverses the migration for anyone who previously upgraded on the Flutter
master branch.

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

## 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] 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
2023-04-05 09:05:37 -07:00
Danny Tuppeny
1a6a20cdc6
[flutter_tools] Include mode in app.start event, and forward app.start to DAP clients (#121239)
[flutter_tools] Include mode in app.start event, and forward app.start to DAP clients
2023-04-05 05:39:09 +00:00
Ben Konyi
d83c510de9
Reland "Serve DevTools when running flutter test (#123607)" (#124058)
Originally reverted due to a misattributed hot reload benchmark
regression.

This reverts commit f5bce716e1.
2023-04-04 19:44:14 -04:00
Jackson Gardner
37d4e7d60e
Always use the canvaskit path from the web sdk. (#123915)
Always use the canvaskit path from the web sdk.
2023-04-04 22:36:43 +00:00
Victoria Ashworth
842873c2fc
Allow --ipv6 flag for flutter attach on iOS devices (#123822)
Allow --ipv6 flag for flutter attach on iOS devices
2023-04-04 22:33:28 +00:00
Victoria Ashworth
dbc18bbdb8
Add flag to filter by device connection interface (#124034)
Add flag to filter by device connection interface
2023-04-04 22:33:26 +00:00
Christopher Fujino
b2c65acd5a
[flutter_tools] Remove --no-sound-null-safety #4 (#124039)
Re-land of https://github.com/flutter/flutter/pull/123297 without any of
the commits at the end attempting to fix customer-testing.

Fixes https://github.com/flutter/flutter/issues/118810
2023-04-04 15:25:27 -07:00
Victoria Ashworth
34d2c8d030
Better support for wireless devices in IDEs (#123716)
Better support for wireless devices in IDEs
2023-04-04 20:39:38 +00:00
Victoria Ashworth
d6593dee96
Make flutter_adapter_test more resilient to pub output (#124139)
Make flutter_adapter_test more resilient to pub output
2023-04-04 19:36:39 +00:00
Jenn Magder
d4934fb6ab
Add readlink -f flag to CocoaPods script to workaround Xcode 14.3 issue (#124062) 2023-04-03 16:55:00 -07:00
Casey Hillers
6fe54f8811
Revert "[flutter_tools] Remove --no-sound-null-safety #3" (#123969)
Revert "[flutter_tools] Remove --no-sound-null-safety #3"
2023-04-03 00:19:22 +00:00
Chinmay Garde
f6c2b10e1a
[Impeller] Plumb through the impeller-force-gl flag. (#123828)
[Impeller] Plumb through the impeller-force-gl flag.
2023-03-31 15:13:10 +00:00
Dan Field
ad7e2f7b78
Disable Fuchsia SDK usage unless opted in (#123084)
Disable Fuchsia SDK usage unless opted in
2023-03-31 02:31:07 +00:00
Zachary Anderson
f5bce716e1
Revert "Serve DevTools when running flutter test (#123607)" (#123810)
This reverts commit c3de901538.
2023-03-30 14:56:13 -07:00
Chinmay Garde
7d31fe32f8
[Impeller] Plumb through the enable-vulkan-validation flag. (#123808)
[Impeller] Plumb through the enable-vulkan-validation flag.
2023-03-30 21:34:19 +00:00
Ben Konyi
c3de901538
Serve DevTools when running flutter test (#123607)
Also clean up messaging output by `flutter test` when `--start-paused` is provided.
2023-03-30 11:51:08 -04:00
Sigurd Meldgaard
7b54a30e31
Notify about existing caches when preloading (#122592) 2023-03-30 16:20:33 +02:00
Jackson Gardner
b57c59b4a7
Invalidate the WebStaticAssets target if the web sdk changes. (#123739)
Invalidate the `WebStaticAssets` target if the web sdk changes.
2023-03-30 02:20:19 +00:00
Brian Quinlan
06f015a8c0
Modify flutter_tests dart:io mocks to support Dart 3.0 (#123706)
Modify flutter_tests dart:io mocks to support Dart 3.0
2023-03-30 02:18:27 +00:00
Loïc Sharma
9f2ac97174
[Windows] Add version info migration (#123414)
[Windows] Add version info migration
2023-03-29 20:11:18 +00:00
Victoria Ashworth
fa01649a59
Update device selection to wait for wireless devices to load (#122932)
Update device selection to wait for wireless devices to load
2023-03-29 17:58:07 +00:00
Christopher Fujino
820ec70a8d
[flutter_tools] Remove --no-sound-null-safety #3 (#123297)
[flutter_tools] Remove --no-sound-null-safety #3
2023-03-29 17:56:23 +00:00
Jenn Magder
6e5a530737
Add flags to make App.framework work in app extension (#123618)
Add flags to make App.framework work in app extension
2023-03-28 23:10:06 +00:00
stuartmorgan
80cee59878
Don't rethrow Dart plugin registration exceptions (#122111)
Don't rethrow Dart plugin registration exceptions
2023-03-28 15:08:57 +00:00
Loïc Sharma
8f62e34267
[Focus] Add run key command to dump the focus tree (#123473)
[Focus] Add run key command to dump the focus tree
2023-03-28 00:33:39 +00:00
Andrew Kolos
66e6acbe9f
throw ToolExit when --web-port is an integer outside the valid TCP port range (#123269)
throw `ToolExit` when `--web-port` is an integer outside the valid TCP port range
2023-03-27 19:58:37 +00:00
Shibata Ryusei
1fb2158e36
Add lints test for all templates (#120526)
Add lints test for all templates
2023-03-26 11:10:23 +00:00
Janice Collins
81e9060968
Suppress analytics flag pass through to analysis server (#123235)
Suppress analytics flag pass through to analysis server
2023-03-24 19:59:15 +00:00
Dan Field
6fd59890c3
Ignore spam from SurfaceSyncer (#123262)
Ignore spam from SurfaceSyncer
2023-03-23 21:55:39 +00:00
Michael Goderbauer
31798757e7
replace some ._() constructors with class modifiers (#122765) 2023-03-23 12:29:18 -07:00
Ben Konyi
5a36bddd2b
Stop serving Observatory by default (#122419)
Observatory can still be enabled by providing `--serve-observatory` or
invoking the `_serveObservatory` private service RPC via web socket or
HTTP.

Related to https://github.com/dart-lang/sdk/issues/50233
2023-03-23 12:52:30 -04:00
Harry Terkelsen
897e3db40c
Inject the gstatic CanvasKit CDN URL by default in flutter build web (#122772) 2023-03-23 09:17:25 -07: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
Michael Goderbauer
fda9ecfef7
Remove 1745 decorative breaks (#123259)
Remove 1745 decorative breaks
2023-03-22 21:12:22 +00:00
Christopher Fujino
28d707693b
toolexit on malformed yaml (#123167)
[flutter_tools] toolexit on malformed yaml during gen-l10n
2023-03-22 02:05:24 +00:00
Bartek Pacia
c40dd27681
Fix Gradle warning in a freshly flutter createed Android project (#122290)
Fix Gradle warning in a freshly `flutter create`ed Android project
2023-03-21 23:41:49 +00:00
Lau Ching Jun
7e4822d5d6
Use DeviceDiscoveryFilter correctly in ProxiedDevices. (#123144)
Use DeviceDiscoveryFilter correctly in ProxiedDevices.
2023-03-21 22:52:16 +00:00
Michael Goderbauer
25e38a2a87
Bump lower Dart SDK constraints to 3.0 & add class modifiers (#122546)
Bump lower Dart SDK constraints to 3.0 & add class modifiers
2023-03-21 20:21:58 +00:00
Christopher Fujino
7d767270b2
[flutter_tools] replace --no-analytics with --suppress-analytics (#123133)
[flutter_tools] replace --no-analytics with --suppress-analytics
2023-03-21 19:18:57 +00:00
Victoria Ashworth
9136a47458
Set plugin template minimum iOS version to 11.0 (#122625)
Set plugin template minimum iOS version to 11.0
2023-03-21 16:40:50 +00:00
Zachary Anderson
7e88acfb0e
[flutter_tool] Adds a flag to disable Impeller (#122960) 2023-03-20 22:23:23 -07:00
Christopher Fujino
6b7c60d69a
manual pub roll (#123071)
manual pub roll
2023-03-21 01:08:51 +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
Zachary Anderson
e6e99e2df5
Skip web hot restart tests (#123019)
Related https://github.com/flutter/flutter/issues/123018
2023-03-20 10:08:00 -07:00
Jackson Gardner
a88eb172b7
Always flush files when setting up the test directory. (#122856)
Always flush files when setting up the test directory.
2023-03-17 20:45:05 +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
Christopher Fujino
69921495eb
Revert "Fix hot restart flake" (#122855)
Landing revert on red to fix the build.
2023-03-16 22:40:42 -07:00
Jackson Gardner
be97d03a25
Use depfile with dart2wasm to determine when to rebuild. (#122817)
Use depfile with dart2wasm to determine when to rebuild.
2023-03-16 23:13:04 +00:00
Christopher Fujino
7e151b4641
[flutter_tools] throw tool exit on invocation of flutter format (#121646)
[flutter_tools] throw tool exit on invocation of flutter format
2023-03-16 21:40:26 +00:00
Anna Gringauze
62171dfe38
Fix hot restart flake (#122776) 2023-03-16 13:11:55 -07:00
Greg Spencer
c2f5bf99f1
Add macos project auto migration code for FlutterApplication (#122336)
Add macos project auto migration code for FlutterApplication
2023-03-16 01:01:03 +00:00
Victoria Ashworth
27248d4b64
Separate attached and wireless devices (#122615)
Separate attached and wireless devices
2023-03-15 16:35:05 +00:00
Yegor
091104f8bc
[web] stop using deprecated jsonwire web-driver protocol (#122560)
[web] stop using deprecated jsonwire web-driver protocol
2023-03-14 18:25:23 +00:00
Bartek Pacia
37fc9ed260
[flutter_tools] Clean up boolArgDeprecated and stringArgDeprecated (#122184)
[flutter_tools] Clean up `boolArgDeprecated` and `stringArgDeprecated`
2023-03-13 21:20:19 +00:00
Victoria Ashworth
ee42a302ec
Move target devices logic to its own classes and file (#121903)
Move target devices logic to its own classes and file
2023-03-13 16:14:21 +00:00
Sigurd Meldgaard
1fd84f88e9
Always use user-level pub cache (#121802)
Use the pub cache resolved by pub itself.
To add packages to the flutter.zip download they are packaged as tar.gz and added to the pub-cache on first run by using  `pub cache preload`.
2023-03-13 08:38:17 +01:00
sigmundch
aaa9cead70
[tool][web] Pass invoker flag to dart2js. (#122344)
[tool][web] Pass invoker flag to dart2js.
2023-03-11 03:24:34 +00:00
Jim Graham
3b6589924a
Update sdk version in temp testing package (#122423) 2023-03-10 13:52:26 -08:00
Tim Maffett
2e8c3468e7
fix devtool instructional messages after flutter build ... --analyze-size . Fixes #122229 (#122230)
fix devtool instructional messages after `flutter build ... --analyze-size `.  Fixes #122229
2023-03-09 22:29:50 +00:00
Navaron Bracke
57171a3fef
[flutter_tools] Add namespace getter in Android project; use namespace as fallback (#121416)
[flutter_tools] Add namespace getter in Android project; use namespace as fallback
2023-03-09 22:19:04 +00:00
stuartmorgan
62116f998b
Improve Dart plugin registration handling (#122046)
Improve Dart plugin registration handling
2023-03-09 21:33:38 +00:00
Reid Baker
fe9e819143
Create configOnly flag for android (#121904)
Create configOnly flag for android
2023-03-08 19:46:52 +00:00
Mouad Debbar
a9700ffdd5
Revert "[web:tools] always use CanvasKit from the cache when building web apps (#93002)" (#117693)
Revert "[web:tools] always use CanvasKit from the cache when building web apps (#93002)"
2023-03-08 19:45:51 +00:00
Anna Gringauze
d76860ad60
Add printing on failure to web hotrestart tests (#122115) 2023-03-07 15:35:00 -08:00
Mouad Debbar
95c2ad5047
[web] Ensure CanvasKit is served from the correct location (#121902)
[web] Ensure CanvasKit is served from the correct location
2023-03-07 21:38:35 +00:00
chunhtai
026adb8cc7
Adds vmservices for getting iOS build options (#121736)
Adds vmservices for getting iOS build options
2023-03-06 22:37:55 +00:00
Christopher Fujino
b1641749fc
pin flutter_plugin_android_lifecycle and roll other pub deps (#122043)
pin flutter_plugin_android_lifecycle and roll other pub deps
2023-03-06 21:51:07 +00:00
Seiya Kokushi
acc840e574
[tool] Proposal to multiple defines for --dart-define-from-file (#120878)
[tool] Proposal to multiple defines for --dart-define-from-file
2023-03-06 18:16:14 +00:00
Sigurd Meldgaard
7a28078509
Use dart pub instead of dart __deprecated pub (#121605) 2023-03-06 11:23:12 +01:00
Christopher Fujino
26b7456f88
[flutter_tools] remove late from update-packages command (#121891)
[flutter_tools] remove late from update-packages command
2023-03-03 22:38:19 +00:00
Chris Yang
b81b1e28a3
[flutter_tool] add enable-embedder-api flag (#121895)
[flutter_tool] add enable-embedder-api flag
2023-03-03 21:13:54 +00:00
Victoria Ashworth
cc26a1aa0c
Update device filtering and introduce isConnected and connectionInterface (#121359)
Update device filtering and introduce isConnected and connectionInterface
2023-03-03 18:06:16 +00:00
Danny Tuppeny
3494c08448
[flutter_tools/dap] Inform DAP client whether restart is supported (#121610)
[flutter_tools/dap] Inform DAP client whether restart is supported
2023-03-03 12:54:23 +00:00
Christopher Fujino
902dac4763
ensure no pub output while caching PubDependencies artifact (#121831)
[flutter_tools] ensure no pub output while caching PubDependencies artifact
2023-03-03 02:40:14 +00:00
Kevin Moore
a8cc95e36d
flutter_tool: only enable wasm compile in master channel (#121755)
flutter_tool: only enable wasm compile in master channel
2023-03-02 22:21:50 +00:00
Kevin Moore
0cd6f1fbdb
[flutter_tool] advertise the default value for --dart2js-optimization (#121621)
[flutter_tool] advertise the default value for --dart2js-optimization
2023-03-01 01:17:56 +00:00
Ben Konyi
ecd7518df5
Reland "Remove references to Observatory (#118577)" (#121606)
This reverts commit 275ab9c69b.
2023-02-28 11:57:04 -05:00
Flutter GitHub Bot
cf4ef28b94
Roll pub packages (#121569)
Roll pub packages
2023-02-28 03:10:07 +00:00
Todd Volkert
c4ef072369
Cocoapods ffi error can be in stdout or stderr (#121470)
Cocoapods ffi error can be in stdout or stderr
2023-02-28 00:11:29 +00:00
Michael Goderbauer
275ab9c69b
Revert "Reland "Remove references to Observatory (#118577)" (#121215)" (#121555)
Revert "Reland "Remove references to Observatory (#118577)""
2023-02-27 23:46:53 +00:00
Danny Tuppeny
06952ba254
[flutter_tools] Add support for URI formats like ?line=x for "flutter test" (#119740)
* [flutter_tools] Add support for URI formats like ?line=x for "flutter test"

* Remove unnecessary function

* Handle parsing absolute paths on Windows

* Use Windows-style paths when running on Windows

* Fix paths in isFile

* Remove unnecessary clear
2023-02-27 19:13:00 +00:00
Christopher Fujino
5c334d10df
Revert "show web-server in flutter devices (#121373)" (#121532)
Revert "[flutter_tools] show web-server in flutter devices"
2023-02-27 18:44:09 +00:00
Greg Price
516b60bda1
Give error on too many arguments to flutter config (#121494)
Give error on too many arguments to `flutter config`
2023-02-27 17:22:20 +00:00
Ben Konyi
fbae472fc3
Reland "Remove references to Observatory (#118577)" (#121215)
This reverts commit 298d8c76ba.
2023-02-27 09:26:43 -05:00
Christopher Fujino
6b3f95832a
show web-server in flutter devices (#121373)
[flutter_tools] show web-server in flutter devices
2023-02-24 23:52:06 +00:00
Lioness100
26b6c1bedd
Fix typos (#121171)
* Fix typos

* lowercase animated & opacity

* Undo typo fix

---------

Co-authored-by: Michael Goderbauer <goderbauer@google.com>
2023-02-23 19:43:21 +00:00
David Iglesias
a463bb82c4
[tool][web] Makes flutter.js more G3 friendly. (#120504)
* Allow any JS file in flutter loader.

* Nag only if service worker API is completely unavailable.

* Add info about Secure Contexts if that may be the reason why serviceworker is not available.

* Update sanity test.

* If service worker settings are null, do not even check if the API is available.
2023-02-21 20:51:37 +00:00
Enguerrand ARMINJON
6259b690f6
feature/clean-a-specific-scheme: Add this-scheme new flag for clean command (#116733)
Co-authored-by: Enguerrand_ARMINJON_MAC_2 <earminjon@sqli.com>
2023-02-21 17:35:13 +00:00
Mateus Felipe C. C. Pinto
ebbc94bc2b
allow passing --file-reporter option to test running refs #69425 (#120716)
* allow passing --file-reporter option to test running refs #69425

* Add trailing comma to help to meet style requirements

* Add space between tests for clarity

---------

Co-authored-by: daniel-v <dvarga@skawa.hu>
2023-02-21 17:24:11 +00:00
Ian Hickson
6205c110d6
Remove "note that" in our documentation (as per style guide) (#120842)
* lerp documentation

* Remove Note, Note That from repo

* Improve BorderSide documentation.

* apply review comments
2023-02-17 22:27:33 +00:00
Jenn Magder
9fe556705b
Print sub process that failed to run in tool (#120999) 2023-02-17 22:02:51 +00:00
Jackson Gardner
674254c036
Always use the testbed in web_test.dart so environment is populated. (#120984) 2023-02-17 10:19:09 -08:00
Casey Hillers
298d8c76ba
Revert "Remove references to Observatory (#118577)" (#120929)
This reverts commit 2df140f40d.
2023-02-16 21:28:30 -08:00
Danny Tuppeny
cacef57b6e
[flutter_tools] Skip over "Resolving dependencies..." text in integration tests (#120077)
Sometimes when the integration tests run Flutter apps they get this output (perhaps based on timing of file modification times). Some of the tests want to verify strict output but not fail just based on these lines before the app starts.

See https://github.com/flutter/flutter/issues/120015 / https://github.com/flutter/flutter/pull/120016.
2023-02-16 10:12:16 -08:00
stuartmorgan
e65dfba8e1
Add Linux unit tests to plugin template (#120814)
* Add Linux unit tests to plugin template

Adds an example native unit test to the plugin template for Linux,
matching the structure we use for our 1P plugin unit tests. Once these
have been added for all platforms+languages, they will be documented on
a new plugin development page to explain their use.

While ideally we would adjust the engine APIs first to allow for testing
the method call handler directly, it's unclear when we will have time
for that work, and for a complex plugin most of the testing wouldn't be
at that layer anyway, so having the structure in place with the
limitations documented is still a significant improvement over having
nothing in the template.

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

* Add creation test

* Add integration tests

* Missing newlines

* test owner

* Typo
2023-02-15 19:13:11 +00:00
Christopher Fujino
c6b636fa51
[flutter_tools] Replace Future.catchError() with Future.then(onError: ...) (#120637)
* wip run_local_linter.dart

* get run_local_linter.dart working

* slow working implementation

* speed up run_local_linter.dart

* fix run_local_linter.dart

* remove catchError

* another fix

* fix another

* fix

* more fixes

* fix moar

* fix moar

* fix

* finish

* fix tests

* clean up further

* code review

* delete run_local_linter.dart
2023-02-15 19:03:00 +00:00
Jason Simmons
8d150833b0
Use the impellerc GLES output flag when compiling shaders for Android (#120647) 2023-02-15 19:01:00 +00:00
stuartmorgan
ef49f5661b
Add Android unit tests to plugin template (#120720)
* Add Java tests

* Add Kotlin

* Add integration testing

* Add cerate tests
2023-02-15 17:25:23 +00:00
Zachary Anderson
a664f08a56
In test of --(no-)fatal-infos analyzer flags, pin missing_return to info (#120797)
* In test of --(no-)fatal-infos analyzer flags, pin missing_return to info

* Remove trailing spaces
2023-02-15 17:21:49 +00:00
Jackson Gardner
4b8ad1b007
Temporarily disable info-based analyzer unit tests. (#120753)
We should address this more permanently:
https://github.com/flutter/flutter/issues/120750
2023-02-15 06:29:23 +00:00
Ian Hickson
d29668ddb2
Improve network resources doctor check (#120417)
...and various other minor cleanup:

* Moved "FLUTTER_STORAGE_BASE_URL" into a constant throughout the code. There are other strings that we should do that to but this one was relevant to the code I was changing.

* Fixed the logger's handling of slow warnings. Previously it deleted too much text. Fixed the test for that to actually verify it entirely, too.

* Made the logger delete the slow warning when it's finished.

* Fixed 'Please choose one (To quit, press "q/Q")' message to be the cleaner 'Please choose one (or "q" to quit)'.

* Added a debug toString to ValidationResult for debugging purposes (not used).

* In http_host_validator:

  - Shortened constant names to be clearer (e.g. kPubDevHttpHost -> kPubDev).
  - Added GitHub as a tested host since when you run `flutter` we hit that immediately.
  - Renamed the check "Network resources".
  - Updated the `slowWarning` of the check to say which hosts are pending.
  - Removed all timeout logic. Timeouts violate our style guide.
  - Removed `int.parse(... ?? '10')`; passing a constant to `int.parse` is inefficient.
  - Replaced the `_HostValidationResult` class with `String?` for simplicity.
  - Improved the error messages to be more detailed.
  - Removed all checks that dependened on the stringification of exceptions. That's very brittle.
  - Added a warning specifically for HandshakeException that talks about the implications (MITM attacks).
  - Replaced exception-message-parsing logic with just calling `Uri.tryParse` and validating the result.
  - Replaced a lot of list-filtering logic with just a single for loop to check the results.
  - Replaced code that added a constant to a known-empty list with just returning a constant list.
  - Revamped the logic for deciding which hosts to check to just use a single chain of if/else blocks instead of getters, lists literals with `if` expressions, `??`, functions, etc spread over multiple places in the code.
2023-02-15 00:02:09 +00:00
godofredoc
9d94a51b60
Move linux-x64-flutter-gtk.zip to linux-x64-debug location. (#120658)
* Move linux-x64-flutter-gtk.zip to linux-x64-debug location.

linux-x64-flutter-gtk.zip is being uploaded twice to linux-x64-debug
and linux-x64 as part of making a soft transition to use linux-x64-debug
location. This PR starts using the copy inside linux-x64-debug to later
remove the duplicated upload.

* Also move arm64.

* Do not override output dir.
2023-02-15 00:00:23 +00:00
Tae Hyung Kim
becb6bd00a
Fix message type inconsistency between locales (#120129)
* init

* fix error handling

* fix issue

* lint?

* error handling tests

* lint
2023-02-13 23:05:57 +00:00
Ben Konyi
2df140f40d
Remove references to Observatory (#118577)
Observatory is being deprecated for Dart 3.0 so it should no longer be
referenced in tooling messaging / flags.

See https://github.com/dart-lang/sdk/issues/50233
2023-02-13 14:29:30 -05:00
Mouad Debbar
d5dbcb7085
Revert "Revert "[web] Move JS content to its own .js files (#117691)" (#120275)" (#120363)
This reverts commit 0fb4406c30.
2023-02-10 21:24:08 +00:00
Pascal Welsch
25c2c22d29
Delete Chrome temp cache after closing (#119062)
* Delete Chrome temp cache after closeing

* Update packages/flutter_tools/lib/src/web/chrome.dart

Co-authored-by: Christopher Fujino <fujino@google.com>

---------

Co-authored-by: Christopher Fujino <fujino@google.com>
2023-02-10 17:39:58 +00:00
Ivan Dlugos
f945ad99c3
Resolve dwarf paths to enable source-code mapping of stacktraces (#114767)
* feat: add "--resolve-dwarf-paths" to gen_snapshot

* chore: update tests
2023-02-09 23:05:44 +00:00
Jonah Williams
425ab5dca5
Remove test that verifies we can switch to stateless (#120390) 2023-02-09 20:58:57 +00:00
Michael Thomsen
c8c8621416
Clean up null safety messages (#120350) 2023-02-09 19:40:32 +01:00
Christopher Fujino
1546fa08d3
[flutter_tools] toolExit on sdkmanager exit during doctor --android-licenses (#120330)
* tool exit on sdk manager exit and add test

* be more specific about error message
2023-02-09 18:34:02 +00:00
Daco Harkes
0521c60cd2
Support --local-engine=ios_debug_sim (#119524)
Fixes:

* https://github.com/flutter/flutter/issues/119523
2023-02-09 18:32:52 +00:00
Kevin Chisholm
0fb4406c30
Revert "[web] Move JS content to its own .js files (#117691)" (#120275)
This reverts commit e03029ef6a.
2023-02-08 18:17:29 -06:00
Andrew Kolos
4a9660881e
Reland "Stop recursively including assets from asset directories" (#120312)
* stop recursively including assets from asset directories

* remove unused imports

* lint
2023-02-08 21:41:19 +00:00
Mouad Debbar
7f578fb01f
Revert "Stop recursively including assets from asset folders (#120167)" (#120283)
This reverts commit da36bd6fc0.
2023-02-08 10:42:02 -05:00
Christopher Fujino
aed9b4adce
Revert "Revert "Fix unable to find bundled Java version (#119244)" (#119981)" (#120107)
This reverts commit f7c2bd05f0.
2023-02-07 21:42:20 +00:00
Christopher Fujino
1089588863
un-pin package:intl (#119900) 2023-02-07 12:10:18 -08:00
Andrew Kolos
da36bd6fc0
Stop recursively including assets from asset folders (#120167)
* add test

* fix

* use preexisting testFileSystem

* fix variant tests

* Revert "use preexisting testFileSystem"

This reverts commit b6df288ef4.

* nit: grammar
2023-02-07 16:20:23 +00:00
Mouad Debbar
e03029ef6a
[web] Move JS content to its own .js files (#117691) 2023-02-07 10:51:52 -05:00
林洵锋
ec524ed068
Fix flutter_tools stuck when using custom LLDB prompt (#119443)
* Fix flutter_tools stuck when using custom LLDB prompt

* Remove trailing space character

* Fix local variable name

* Add comment

* Remove trailing space character

* Update packages/flutter_tools/lib/src/ios/ios_deploy.dart

Co-authored-by: Jenn Magder <magder@google.com>

* Update packages/flutter_tools/lib/src/ios/ios_deploy.dart

Co-authored-by: Jenn Magder <magder@google.com>

* Remove trailing space character

---------

Co-authored-by: Jenn Magder <magder@google.com>
2023-02-06 22:50:07 +00:00
Ben Konyi
47a0674651
Reland "Add --serve-observatory flag to run, attach, and test (#118402)" (#119737)
This reverts commit 254a796bc3.
2023-02-06 09:23:35 -05:00
Christopher Fujino
b8f5394a5c
[flutter_tools] Fix Future error handling ArgumentError in doctor --android-licenses (#119977)
* wip

* write test

* make error handling printError

* remove diff
2023-02-05 07:06:19 +00:00
Brandon DeRosier
f10e625eb2
De-flake adapter integration test (#120016) 2023-02-04 15:29:59 -08:00
godofredoc
f7c2bd05f0
Revert "Fix unable to find bundled Java version (#119244)" (#119981)
This reverts commit 57fd50f84e.
2023-02-04 02:57:53 +00:00
crasowas
57fd50f84e
Fix unable to find bundled Java version (#119244) 2023-02-03 18:04:04 -08:00
Christopher Fujino
9a7e18701e
[flutter_tools] fix Cannot delete file ENOENT from fuchsia_asset_builder (#119867)
* fix

* add test
2023-02-03 19:24:41 +00:00
Christopher Fujino
d820aec786
Manual pub roll with dwds fix (#119575)
* roll packages

* fix dwds

* empty

---------

Co-authored-by: fluttergithubbot <fluttergithubbot@gmail.com>
2023-02-02 21:38:08 +00:00
Danny Tuppeny
8387c2388b
[flutter_tools] Use base DAP detach and ensure correct output (#119076) 2023-02-02 13:28:12 -08:00
Mouad Debbar
d4b6898478
[web] Put all index.html operations in one place (#118188)
* [web] Put all index.html operations in one place

* review comments

* fix build

* change quotes

* fix test
2023-02-02 19:49:18 +00:00
Michael Goderbauer
b0f1714b7b
Make Flex,Row,Column const for real (#119673)
* Make Flex,Row,Column const for real

* dart fix --apply

* fix snippets

* fix integration test

* add comment
2023-02-02 19:33:57 +00:00
Sigurd Meldgaard
ca0596e41d
Fix pub get --unknown-flag (#119622) 2023-02-02 16:22:39 +01:00
Jesús S Guerrero
f767f860eb
check if directory exists before listing content (#119748) 2023-02-02 03:02:11 +00:00
Ian Hickson
4c99da6c56
Avoid printing blank lines between "Another exception was thrown:" messages. (#119587) 2023-02-01 23:57:54 +00:00
Alex Li
4ae2d3b6df
🔥 Do not format the messages file for gen-l10n (#119596)
* 🔥 Do not format the messages file

*  Add test

*  Add the link to the test

*  Respect the path separator from the file system

*  Add the untranslated messages file existence test
2023-02-01 23:45:38 +00:00
Zachary Anderson
254a796bc3
Revert "Reland "Add --serve-observatory flag to run, attach, and test (#118402)" (#119529)" (#119729)
This reverts commit 7477d7ac79.
2023-02-01 09:19:48 -08:00
Alex Li
8d0af36798
🥅 Produce warning instead of error for storage base url overrides (#119595)
* 🥅 Only log warning for storage base url

*  Add test

*  Add the link to the test

*  Remove the test

*  Remove the extra import
2023-02-01 03:49:31 +00:00
Tae Hyung Kim
3884381415
Make gen-l10n error handling independent of logger state (#119644)
* init

* lint

* lint again
2023-01-31 15:28:27 -08:00
Victoria Ashworth
f6b0c6ddef
Use first Dart VM Service found with mDNS if there are duplicates (#119545)
* fix when duplicate mdns results are found

* put mdns auth code in it's own function and update tests

* add comments, refactor auth code parsing, other small tweaks
2023-01-31 17:48:19 +00:00
Chris Bracken
d272a3ab80
Reland: [macos] add flavor options to tool commands (#119564)
* Reland: [macos] add flavor options to tool commands

Adds --flavor option to flutter run and flutter build. Running against
preexisting devicelab flavor tests for feature parity between macOS,
iOS, and Android.

This relands #118421 by alex-wallen which was reverted in #118858 due to
the following test failures:

The bail-out with "Host and target are the same. Nothing to install."
added in `packages/flutter_tools/lib/src/commands/install.dart`
triggered failures in the following tests, which unconditionally attempt
to install the built app, which is unsupported on desktop since the
host and target are the same:

* https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8791495589540422465/+/u/run_flutter_view_macos__start_up/test_stdout
* https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8791496218824259121/+/u/run_complex_layout_win_desktop__start_up/test_stdout
* https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8791496218165602641/+/u/run_flutter_gallery_win_desktop__start_up/test_stdout

Fixes #64088

* Partial revert: eliminate install check on desktop

The original flavour support patch included a check that triggered a
failure when flutter install is run on desktop OSes. This was
intentional, since the host and target devices are the same and
installation is unnecessary to launch the app on currently-supported
desktop OSes.

Note that Windows UWP apps *do* require installation to run, and we used
to have an install command for those apps, though UWP is no longer
supported.

Since that part of the change was orthogonal to flavour support itself,
I'm reverting that component of the change and we can deal with it
separately if so desired.
2023-01-31 17:37:46 +00:00
Danny Tuppeny
67d07a6de4
[flutter_tools] Fix parsing of existing DDS URIs from exceptions (#119506)
* [flutter_tools] Fix parsing of existing DDS URIs from exceptions

Fixes #118609.

* Fix formatting

Co-authored-by: Christopher Fujino <fujino@google.com>

* Fix formatting

Co-authored-by: Christopher Fujino <fujino@google.com>

---------

Co-authored-by: Christopher Fujino <fujino@google.com>
2023-01-31 17:36:44 +00:00
Ben Konyi
7477d7ac79
Reland "Add --serve-observatory flag to run, attach, and test (#118402)" (#119529)
* Reland "Add --serve-observatory flag to run, attach, and test (#118402)"

This reverts commit 86ab01d2bd.

* Fix flaky failures

* Fix VM service disappearing failure
2023-01-30 21:00:18 +00:00
Elias Yishak
458b298f98
Refactoring to use ver command instead of systeminfo (#119304)
* refactoring to use `ver` command instead of `systeminfo`

* fix tests to match new approach

* adding another valid validator using brazil locale text

* refactor tests to use generic fake class `ver` arg + showing output from `ver` if unsuccessful

* update reason text in test

* fix reason text to be hard coded
2023-01-30 19:29:13 +00:00
Jonah Williams
4dbb573ff0
[flutter_tools] remove usage of remap samplers arg (#119346) 2023-01-27 18:49:49 +00:00
Zachary Anderson
86ab01d2bd
Revert "Add --serve-observatory flag to run, attach, and test (#118402)" (#119302)
This reverts commit 6cd4fa45e2.
2023-01-26 16:43:39 -08:00
Harry Terkelsen
42bd5f2bd1
Download platform-agnostic Flutter Web SDK in the flutter_tool (#118654) 2023-01-26 14:21:05 -08:00
Tae Hyung Kim
02a9c151f6
Fix lexer issue where select/plural/other/underscores cannot be in identifier names. (#119190) 2023-01-25 15:31:38 -08:00
Ben Konyi
6cd4fa45e2
Add --serve-observatory flag to run, attach, and test (#118402)
This flag will allow for Observatory to be served by the VM service once it is disabled by default in the Dart SDK.
2023-01-25 12:46:08 -05:00
Victoria Ashworth
81052a7d36
Add usage event to track when a iOS network device is used (#118915)
* Add usage event to track when a iOS network device is used

* update usage event to track percentage of iOS network vs usb devices, update and fix tests

* refactor tracking to happen in usageValues with a custom dimension
2023-01-25 10:57:12 -06:00
Gary Qian
5dabe102a2
Fix path name to discover debug apk on add2app builds (#117999) 2023-01-24 13:19:09 -08:00
stuartmorgan
e3c51a2f2a
Add Windows unit tests to plugin template (#118638)
* Add Windows unit tests to plugin template

Adds an example native unit test to the plugin template for Windows,
matching the format we use for our 1P plugin example app unit tests.
Once these have been added for all platforms+languages, they will be
documented on a new plugin development page to explain their use.

Since we don't appear to be running our current plugin e2e tests for
Windows, this adds a new configuration to run them. I haven't
`led`-tested this, so it may not work, but this will give a starting
point for getting them running.

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

* Minor fix

* Add test owner

* Fix typo

* Fix test feature flag
2023-01-24 18:23:57 +00:00
Ahmed Ashour
c35efdaa68
Remove superfluous words. (#119008)
* Remove superfluous words.

* Update packages/flutter/lib/src/widgets/slotted_render_object_widget.dart

Co-authored-by: Michael Goderbauer <goderbauer@google.com>
2023-01-24 01:57:00 +00:00
Michael Goderbauer
38630b6bd1
Remove unnecessary null checks in flutter_tool (#118857)
* dart fix --apply

* manual fixes

* fix after merge conflicts

* review
2023-01-23 21:43:08 +00:00
Mouad Debbar
3bf79607dd
[web] Fix paths fetched by flutter.js (#118684) 2023-01-23 15:02:58 +00:00
Victoria Ashworth
a07e8a6ac4
[reland] Support wireless debugging (#118895)
* Reland "Support iOS wireless debugging (#118104)"

This reverts commit cbf2e16892.

* Remove device loading status
2023-01-20 19:02:37 +00:00
Alexander Markov
492d57262f
Cleanup obsolete --compact-async compiler option (#118894) 2023-01-20 09:48:26 -08:00
Jenn Magder
030288d33b
Revert "[macos] add flavor options to commands in the flutter_tool (#118421)" (#118858)
This reverts commit 73096fd96e.
2023-01-20 03:46:45 +00:00
Alex Wallen
73096fd96e
[macos] add flavor options to commands in the flutter_tool (#118421)
* Add new macos target configured for flavors

* Rename Free App copy-Info.plist to Free App Info.plist

* Remove bogus entitlements

* Remove Generated.xcconfig

* Audit project.pbxproj

* Remove unused configs

* share one info.plist

* Modify scheme so that paid app works

* Codesign automatic

* Pipe flavor as scheme into xcodebuild

* Ignore incoming flavor string

* pipe flavor for flutter run to work

* Add devicelab tests

* Error if host and target device are same for flutter install desktop

* Avoid bang (!) by promoting a local.

Co-authored-by: Jenn Magder <magder@google.com>

* Add supportsInstall property

* Override  in test classes

* Add install test on macOS

* Refactor application_package and add tests for package directory

Co-authored-by: a-wallen <stephenwallen@google.com>
Co-authored-by: Jenn Magder <magder@google.com>
2023-01-19 23:52:16 +00:00
Danny Tuppeny
09bd0f6613
Support logging 'flutter run' communication to DAP clients (#118674)
* Support logging 'flutter run' communication to DAP clients

Fixes https://github.com/Dart-Code/Dart-Code/issues/4266.

* Fix test
2023-01-19 23:50:33 +00:00
Alex Wallen
1dd7f45bfb
Add build macos --config-only option. (#118649)
Co-authored-by: a-wallen <stephenwallen@google.com>
2023-01-19 21:29:17 +00:00
Jenn Magder
cbf2e16892
Revert "Support iOS wireless debugging (#118104)" (#118826)
This reverts commit 5cd2d4c61e.
2023-01-19 12:31:53 -08:00
Victoria Ashworth
5cd2d4c61e
Support iOS wireless debugging (#118104)
* setup wireless debugging to use device IP

* fix tests

* fix unused var and missing annotation

* remove unneeded try catch

* remove commented out line, change null to package id

* better way to get package id

* update mDNS lookup to continously check for server, add messaging if takes too long to find observatory url, update flutter drive to enable publish-port if using network device

* Refactor mDNS Discovery to poll for observatories and better handle multiple instances of the same app. Update drive command to make publish-port more stable. Update attach for iOS to only use Protocol Discovery if applicable, run mDNS and Protocol Discovery simultaneously, handle --debug-port/--debug-url/--device-vmservice-port, continously poll for obseravtories with mDNS, include port in error message when mutliple available

* add and update comments, use logger spinner intead of timer in flutter attach, other small improvements

* add newline to message so next log won't be on same line

* fix install/waiting for permission status progress so it doens't double print the time it took.

* only print backtrace if observatory times out on a physical usb connected device

* fix test

* Update related references from Observatory to Dart VM Service

* fix test
2023-01-19 20:00:21 +00:00
Danny Tuppeny
06909ccfa4
Update packages + fix tests for javascript mime change (#118617)
Update test expectations from application/javascript -> text/javascript

`package:mime` now uses `text/javascript` and not `application/javascript`.

See https://github.com/dart-lang/mime/pull/76.
See https://datatracker.ietf.org/doc/html/rfc9239.

> This document defines equivalent processing requirements for the various script media types. The most widely supported media type in use is `text/javascript`; all others are considered historical and obsolete aliases of `text/javascript`.
2023-01-19 09:54:40 -05:00
Christopher Fujino
374f09e1a6
[flutter_tools] No more implicit --no-sound-null-safety (#118491)
* remove implicit no-sound-null-safety

* add test

* bump sdk constraint in test file
2023-01-18 20:46:09 +00:00
Jonah Williams
2fd8250285
[flutter_tools] re-enable web shader compilation (#118461)
* [flutter_tools] re-enable web shader compilation

* update test cases
2023-01-13 19:43:27 +00:00
Victoria Ashworth
b4d72752bd
Add Info.plist from build directory as input path to Thin Binary build phase (#118209)
* Add Info.plist from build directory as input path to Thin Binary build phase

* fix directive ordering

* migrate benchmark, integration, and example tests
2023-01-13 13:41:08 -06:00
Parker Lougheed
9e11d4a105
Use correct API docs link in create --sample help message (#118371)
* Use correct API doc link in create --sample help message

* Verify Flutter and Dart website links in tool help messages use https

* Adjust test failure reasoning message
2023-01-12 23:47:19 +00:00
joshualitt
8f365a3bdc
[web] Update build to use generated JS runtime for Dart2Wasm. (#118359) 2023-01-12 13:46:39 -08:00
Andrew Kolos
ee1c59d462
reduce pub output from flutter create (#118285)
* reduce pub output from flutter create

* fix fake Pub implementations

* fix tests

* Update pub.dart

* replace enum with simpler boolean

* fix tests

* Revert "fix tests"

This reverts commit 8a3182d3b9.

* Revert "replace enum with simpler boolean"

This reverts commit 445dbc443d.

* go back to using an enum
2023-01-12 21:42:02 +00:00
Andrew Kolos
5630d531b1
[tool] Generate a binary version of the asset manifest (#117233)
* initial

* update asset_bundle_package_test

* Update asset_bundle_test.dart

* Update asset_bundle_package_fonts_test.dart

* update pubspec checksum for smc dependency

* flutter update-packages --force-upgrade

* prefer += 1 over ++

Co-authored-by: Jonah Williams <jonahwilliams@google.com>

* add regexp comment

* rescope int list comparison function

* update packages

Co-authored-by: Jonah Williams <jonahwilliams@google.com>
2023-01-12 19:33:30 +00:00
Sigurd Meldgaard
40bc6b55e4
Move debug error message from failed pub to logger.printTrace (#118379)
* Move debug error message from failed pub to logger.printTrace

* Update test
2023-01-12 19:24:20 +00:00
Sigurd Meldgaard
b7881e5b64
Align flutter pub get/upgrade/add/remove/downgrade (#117896)
* Align `flutter pub get/upgrade/add/remove/downgrade`

* Add final . to command description

* Remove trailing whitespace

* Don't print message that command is being run

* Update expectations

* Use relative path

* Remove duplicated line

* Improve function dartdoc
2023-01-10 23:29:09 +00:00
Brandon DeRosier
700fe3d2b0
[Impeller Scene] Add SceneC asset importing (#118157) 2023-01-10 01:51:40 -08:00