- 04 Jan, 2024 2 commits
-
-
Yegor authored
Fix and unskip the following CanvasKit tests: - `test/painting/decoration_test.dart` - `test/rendering/layers_test.dart` - `test/widgets/app_overrides_test.dart`
-
- 28 Dec, 2023 1 commit
-
-
Ian Hickson authored
Each error section is numbered, so you can all be sure you're talking about the same one. A message is printed at the very end telling you how to find the error blocks in the verbose logs.
-
- 22 Dec, 2023 2 commits
-
-
godofredoc authored
This is part of the migration of adhoc tests to shard tests. Bug: https://github.com/flutter/flutter/issues/139153
-
Yegor authored
Unskip a few CanvasKit tests that pass now.
-
- 20 Dec, 2023 1 commit
-
-
Michael Goderbauer authored
These were not ignoring anything (anymore).
-
- 19 Dec, 2023 1 commit
-
-
Polina Cherkasova authored
Contributes to: https://github.com/flutter/flutter/issues/135856
-
- 18 Dec, 2023 1 commit
-
-
Gray Mackall authored
I added a README at the end of https://github.com/flutter/flutter/pull/131901 and did not realize that it was being run as a test, [leading to test failures (of course)](https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8761789207346423409/+/u/run_test.dart_for_android_preview_tool_integration_tests_shard_and_subshard_None/test_stdout). This makes it so we only run dart files as dart tests.
-
- 15 Dec, 2023 3 commits
-
-
Polina Cherkasova authored
1. Move leak_tracker and leak_tracker_testing out of direct dependencies. 2. Move leak_tracker_flutter_testing from dev to prod dependencies for flutter_test It is prerequisite for https://github.com/flutter/flutter/issues/135856
-
Srujan Gaddam authored
Pinning the package:web dependency constrains downstream packages from using newer versions and making sure they support the version pinned in Flutter. Since the usage of package:web in Flutter is light, we should instead have a small shim like the engine and keep package:web as a dev dependency only.
-
Polina Cherkasova authored
Contributes to https://github.com/flutter/flutter/issues/135856
-
- 14 Dec, 2023 2 commits
-
-
Andrew Kolos authored
Reland of https://github.com/flutter/flutter/pull/132985. Fixes the path to AssetManifest.bin in flavors_test_ios
-
LongCatIsLooong authored
I did not include the `'// flutter_ignore_for_file: stopwatch (see analyze.dart)'` directive since it's currently not used, and adding that shouldn't be too difficult.
-
- 12 Dec, 2023 1 commit
-
-
Gray Mackall authored
Fixes https://github.com/flutter/flutter/issues/124748 Based (heavily) off https://github.com/flutter/flutter/pull/104662
-
- 11 Dec, 2023 3 commits
-
-
Christopher Fujino authored
Help debug https://github.com/flutter/flutter/issues/139597
-
Tirth authored
Tests for `app_bar.0`, `app_bar.1`, `app_bar.2`, `app_bar.3`, `sliver_app_bar.1` and `sliver_app_bar.4` were already present. But directory name was `appbar` rather than `app_bar`. I've renamed the directory to `app_bar` since example files uses that only. Part of #130459
-
LongCatIsLooong authored
Extacted from #130101, dropped the `@_debugAssert` stuff from that PR so it's easier to review.
-
- 08 Dec, 2023 2 commits
-
-
auto-submit[bot] authored
Reverts flutter/flutter#132985 Initiated by: christopherfujino This change reverts the following previous change: Original Description: Provides support for conditional bundling of assets through the existing `--flavor` option for `flutter build` and `flutter run`. Closes https://github.com/flutter/flutter/issues/21682. Resolves https://github.com/flutter/flutter/issues/136092 ## Change Within the `assets` section pubspec.yaml, the user can now specify one or more `flavors` that an asset belongs to. Consider this example: ```yaml # pubspec.yaml flutter: assets: - assets/normal-asset.png - path: assets/vanilla/ice-cream.png flavors: - vanilla - path: assets/strawberry/ice-cream.png flavors: - strawberry ``` With this pubspec, * `flutter run --flavor vanilla` will not include `assets/strawberry/ice-cream.png` in the build output. * `flutter run --flavor strawberry` will not include `assets/vanilla/ice-cream.png`. * `flutter run` will only include `assets/normal-asset.png`. ## Open questions * Should this be supported for all platforms, or should this change be limited to ones with documented `--flavor` support (Android, iOS, and (implicitly) MacOS)? This PR currently only enables this feature for officially supported platforms. ## Design thoughts, what this PR does not do, etc. ### This does not provide an automatic mapping/resolution of asset keys/paths to others based on flavor at runtime. The implementation in this PR represents a simplest approach. Notably, it does not give Flutter the ability to dynamically choose an asset based on flavor using a single asset key. For example, one can't use `Image.asset('config.json')` to dynamically choose between different "flavors" of `config.json` (such as `dev-flavor/config.json` or `prod-flavor/config.json`). However, a user could always implement such a mechanism in their project or in a library by examining the flavor at runtime. ### When multiple entries affect the same file and 1) at least one of these entries have a `flavors` list provided and 2) these lists are not equivalent, we always consider the manifest to be ambiguous and will throw a `ToolExit`. <details> For example, these manifests would all be considered ambiguous: ```yaml assets: - assets/ - path: assets/vanilla.png flavors: - vanilla assets: - path: assets/vanilla/ flavors: - vanilla - path: assets/vanilla/cherry.png flavor: - cherry # Thinking towards the future where we might add glob/regex support and more conditions other than flavor: assets: - path: assets/vanilla/** flavors: - vanilla - path: assets/**/ios/** platforms: - ios # Ambiguous in the case of assets like "assets/vanilla/ios/icon.svg" since we # don't know if flavor `vanilla` and platform `ios` should be combined using or-logic or and-logic. ``` See [this review comment thread](https://github.com/flutter/flutter/pull/132985#discussion_r1381909942) for the full story on how I arrived at this decision. </details> ### This does not support Android's multidimensional flavors feature (in an intuitive way) <details> Conder this excerpt from a Flutter project's android/app/build.gradle file: ```groovy android { // ... flavorDimensions "mode", "api" productFlavors { free { dimension "mode" applicationIdSuffix ".free" } premium { dimension "mode" applicationIdSuffix ".premium" } minApi23 { dimension "api" versionNameSuffix "-minApi23" } minApi21 { dimension "api" versionNameSuffix "-minApi21" } } } ``` In this setup, the following values are valid `--flavor` are valid `freeMinApi21`, `freeMinApi23`, `premiumMinApi21`, and `premiumMinApi23`. We call these values "flavor combinations". Consider the following from the Android documentation[^1]: > In addition to the source set directories you can create for each individual product flavor and build variant, you can also create source set directories for each combination of product flavors. For example, you can create and add Java sources to the src/demoMinApi24/java/ directory, and Gradle uses those sources only when building a variant that combines those two product flavors. > > Source sets you create for product flavor combinations have a higher priority than source sets that belong to each individual product flavor. To learn more about source sets and how Gradle merges resources, read the section about how to [create source sets](https://developer.android.com/build/build-variants#sourcesets). This feature will not behave in this way. If a user utilizes this feature and also Android's multidimensional flavors feature, they will have to list out all flavor combinations that contain the flavor they want to limit an asset to: ```yaml assets: - assets/free/ flavors: - freeMinApi21 - freeMinApi23 ``` This is mostly due to a technical limitation in the hot-reload feature of `flutter run`. During a hot reload, the tool will try to update the asset bundle on the device, but the tool does not know the flavors contained within the flavor combination (that the user passes to `--flavor`). Gradle is the source of truth of what flavors were involved in the build, and `flutter run` currently does not access to that information since it's an implementation detail of the build process. We could bubble up this information, but it would require a nontrivial amount of engineering work, and it's unclear how desired this functionality is. It might not be worth implementing. </details> See https://flutter.dev/go/flavor-specific-assets for the (outdated) design document. <summary>Pre-launch Checklist</summary> </details> [^1]: https://developer.android.com/build/build-variants#flavor-dimensions
-
Kallen Tu authored
Bumping DartDoc to 8.0.2. https://pub.dev/packages/dartdoc/changelog#802 Made a fix for https://github.com/flutter/flutter/issues/139755, so this release rolls that fix in. The fix was made here https://github.com/dart-lang/dartdoc/pull/3595. Not sure who's most relevant to tag so ccing some folks. cc. @srawlins @jason-simmons @gspencergoog ## 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 `///`). - [ ] 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
-
- 07 Dec, 2023 1 commit
-
-
Andrew Kolos authored
Provides support for conditional bundling of assets through the existing `--flavor` option for `flutter build` and `flutter run`. Closes https://github.com/flutter/flutter/issues/21682. Resolves https://github.com/flutter/flutter/issues/136092 ## Change Within the `assets` section pubspec.yaml, the user can now specify one or more `flavors` that an asset belongs to. Consider this example: ```yaml # pubspec.yaml flutter: assets: - assets/normal-asset.png - path: assets/vanilla/ice-cream.png flavors: - vanilla - path: assets/strawberry/ice-cream.png flavors: - strawberry ``` With this pubspec, * `flutter run --flavor vanilla` will not include `assets/strawberry/ice-cream.png` in the build output. * `flutter run --flavor strawberry` will not include `assets/vanilla/ice-cream.png`. * `flutter run` will only include `assets/normal-asset.png`. ## Open questions * Should this be supported for all platforms, or should this change be limited to ones with documented `--flavor` support (Android, iOS, and (implicitly) MacOS)? This PR currently only enables this feature for officially supported platforms. ## Design thoughts, what this PR does not do, etc. ### This does not provide an automatic mapping/resolution of asset keys/paths to others based on flavor at runtime. The implementation in this PR represents a simplest approach. Notably, it does not give Flutter the ability to dynamically choose an asset based on flavor using a single asset key. For example, one can't use `Image.asset('config.json')` to dynamically choose between different "flavors" of `config.json` (such as `dev-flavor/config.json` or `prod-flavor/config.json`). However, a user could always implement such a mechanism in their project or in a library by examining the flavor at runtime. ### When multiple entries affect the same file and 1) at least one of these entries have a `flavors` list provided and 2) these lists are not equivalent, we always consider the manifest to be ambiguous and will throw a `ToolExit`. <details> For example, these manifests would all be considered ambiguous: ```yaml assets: - assets/ - path: assets/vanilla.png flavors: - vanilla assets: - path: assets/vanilla/ flavors: - vanilla - path: assets/vanilla/cherry.png flavor: - cherry # Thinking towards the future where we might add glob/regex support and more conditions other than flavor: assets: - path: assets/vanilla/** flavors: - vanilla - path: assets/**/ios/** platforms: - ios # Ambiguous in the case of assets like "assets/vanilla/ios/icon.svg" since we # don't know if flavor `vanilla` and platform `ios` should be combined using or-logic or and-logic. ``` See [this review comment thread](https://github.com/flutter/flutter/pull/132985#discussion_r1381909942) for the full story on how I arrived at this decision. </details> ### This does not support Android's multidimensional flavors feature (in an intuitive way) <details> Conder this excerpt from a Flutter project's android/app/build.gradle file: ```groovy android { // ... flavorDimensions "mode", "api" productFlavors { free { dimension "mode" applicationIdSuffix ".free" } premium { dimension "mode" applicationIdSuffix ".premium" } minApi23 { dimension "api" versionNameSuffix "-minApi23" } minApi21 { dimension "api" versionNameSuffix "-minApi21" } } } ``` In this setup, the following values are valid `--flavor` are valid `freeMinApi21`, `freeMinApi23`, `premiumMinApi21`, and `premiumMinApi23`. We call these values "flavor combinations". Consider the following from the Android documentation[^1]: > In addition to the source set directories you can create for each individual product flavor and build variant, you can also create source set directories for each combination of product flavors. For example, you can create and add Java sources to the src/demoMinApi24/java/ directory, and Gradle uses those sources only when building a variant that combines those two product flavors. > > Source sets you create for product flavor combinations have a higher priority than source sets that belong to each individual product flavor. To learn more about source sets and how Gradle merges resources, read the section about how to [create source sets](https://developer.android.com/build/build-variants#sourcesets). This feature will not behave in this way. If a user utilizes this feature and also Android's multidimensional flavors feature, they will have to list out all flavor combinations that contain the flavor they want to limit an asset to: ```yaml assets: - assets/free/ flavors: - freeMinApi21 - freeMinApi23 ``` This is mostly due to a technical limitation in the hot-reload feature of `flutter run`. During a hot reload, the tool will try to update the asset bundle on the device, but the tool does not know the flavors contained within the flavor combination (that the user passes to `--flavor`). Gradle is the source of truth of what flavors were involved in the build, and `flutter run` currently does not access to that information since it's an implementation detail of the build process. We could bubble up this information, but it would require a nontrivial amount of engineering work, and it's unclear how desired this functionality is. It might not be worth implementing. </details> See https://flutter.dev/go/flavor-specific-assets for the (outdated) design document. <summary>Pre-launch Checklist</summary> </details> [^1]: https://developer.android.com/build/build-variants#flavor-dimensions
-
- 06 Dec, 2023 1 commit
-
-
Ian Hickson authored
test-exempt: rolling dependencies
-
- 05 Dec, 2023 1 commit
-
-
flutter-pub-roller-bot authored
This PR was generated by `flutter update-packages --force-upgrade`.
-
- 30 Nov, 2023 4 commits
-
-
godofredoc authored
This is part of the deprecation of adhoc tests. Bug: https://github.com/flutter/flutter/issues/139153
-
Tirth authored
Write Tests for API Examples of `cupertino_text_field.0`, `data_table.0`, `icon_button.2` & `ink_well.0` (#139258) Write Tests for API Examples of `cupertino_text_field.0`, `data_table.0`, `icon_button.2` & `ink_well.0` Note: test for `cupertino_text_field.0` was already there but it was named `cupertino_text_field.0.dart`. I renamed it to `cupertino_text_field.0_test.dart`. Part of #130459
-
Christopher Fujino authored
I plan to extend the prepare_package.dart script to upload the flutter preview device ([design doc](https://docs.google.com/document/d/1AzI-_Uk2v1LA2kKKFJ7gVD4xcakXJ6yVZiS5Ek6RHtg/edit#heading=h.byp03plw7mg9)). However, given that that script is one large >1k line file, I decided to organize it into smaller libraries in this PR. There should be no behavioral change in this PR, this is a cleanup only. I made the following changes: 1. Created a //dev/bots/prepare_package/ directory to contain helper libraries 2. Moved everything but the `main()` function in //dev/bots/prepare_package.dart into one of 4 helper libraries under the new directory from step 1: a. archive_creator.dart which contains the code that creates archive directory locally on disk b. archive_publisher.dart which contains the code that uploads the archive to cloud storage c. common.dart for shared constants and definitions d. process_runner.dart for an abstraction over running sub-processes 3. Changed all definitions to `File` and `Directory` from `dart:io` to use the testable versions from `package:file`. This allowed me to use the `MemoryFileSystem` in the unit tests, rather than creating real temp file system directories.
-
godofredoc authored
Adhoc tests are being deprecated and existing tests are being migrated to shard tests. Bug: https://github.com/flutter/flutter/issues/139153
-
- 29 Nov, 2023 1 commit
-
-
Kate Lovett authored
-
- 28 Nov, 2023 4 commits
-
-
godofredoc authored
This is part of the effort to deprecated adhoc tests. Bug: https://github.com/flutter/flutter/issues/139153
-
Tirth authored
Write Tests for API Examples of `snack_bar.0`, `elevated_button.0`, `stepper.0`, `radio.0`, `filled_button.0`, `outlined_button.0` & `card.0` (#138987) Write Tests for API Examples of `snack_bar.0`, `elevated_button.0`, `stepper.0`, `radio.0`, `filled_button.0`, `outlined_button.0` & `card.0` Part of #130459
-
Nate authored
I previously made a PR (#136140) that used `switch` expressions to make some parts of the Flutter codebase easier to understand. It was assigned to the framework team, and @christopherfujino let me know that it was too large to effectively review and recommended breaking it up into smaller pull requests. Here's a PR that only targets files in the `dev/` directory. Hopefully this will be easier to work with! (solves issue https://github.com/flutter/flutter/issues/136139)
-
godofredoc authored
This will allow Dart Team to run customer tests as part of monorepo and will be a step forward to remove ad_hoc tests. Bug: https://github.com/dart-lang/sdk/issues/51042 Bug: https://github.com/flutter/flutter/issues/115476
-
- 27 Nov, 2023 2 commits
-
-
Kallen Tu authored
Bumping DartDoc to 8.0.0. https://pub.dev/packages/dartdoc/changelog Will be also removing the `@hideConstantImplementations` directive since the behaviour is default now. See issue https://github.com/dart-lang/dartdoc/issues/3564. ## 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 `///`). - [ ] 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
-
Jasper van Riet authored
This PR writes tests for a few of the API examples (not all), as requested in #130459. For the test names, I used the existing tests in the `api` folder as guide.
-
- 20 Nov, 2023 1 commit
-
-
Sam Rawlins authored
-
- 17 Nov, 2023 1 commit
-
-
Parker Lougheed authored
Issue reference: https://github.com/flutter/flutter/issues/133877
-
- 15 Nov, 2023 1 commit
-
-
Srujan Gaddam authored
This version is needed so that dart:js_interop can move to extension types. Also adds some code to handle some breaking changes: - Body -> Response. Body was an IDL interface mixin type we exposed in dart:html. Going forward, users should either use Request or Response. - Casts to JSAny. These are temporary until we move package:web types to extension types. Currently, package:web types can't implement JSObject as JSObject will move to be an extension type itself. Co-authored-by:
Kevin Moore <kevmoo@users.noreply.github.com>
-
- 14 Nov, 2023 1 commit
-
-
Michael Goderbauer authored
https://github.com/flutter/flutter/pull/138253 demonstrated that the tests for the textures example weren't actually running on CI. This changes the testing script to execute the tests for everything inside the `examples` directory.
-
- 06 Nov, 2023 1 commit
-
-
Greg Spencer authored
## Description This checks API doc strings for malformed links to examples. It prevents errors in capitalization, spacing, number of asterisks, etc. It won't catch all errors, because it needs to have a minimally indicative string to know that it even is trying to be a link to an example. At a minimum, the line needs to look like (literally, not as a regexp) `///*seecode.*` in order to be seen as a link to an example. Separately, I'm going to add a check to the snippets tool that checks to make sure that an `{@tool}` block includes either a link to a sample file or a dart code block. ## Tests - Added a test to make sure it catches some malformed links.
-
- 03 Nov, 2023 1 commit
-
-
Polina Cherkasova authored
-
- 01 Nov, 2023 1 commit
-
-
Qun Cheng authored
Fixes #119401 This PR is to: * add `Card.filled` and `Card.outlined` factory methods so that we can use tokens for these two types of cards to generate default theme instead of providing hard-corded values in example. * update card.2.dart example. * add test file for card.2.dart example. * fix some mismatch caused by editing the auto-generated defaults by hand in navigation_bar.dart and navigation_drawer.dart.
-