- 22 Nov, 2023 1 commit
-
-
Elias Yishak authored
Add `commandHasTerminal` parameter + apple usage event + `sendException` events for `package:unified_analytics` (#138806) Relates to tracker issue: - https://github.com/flutter/flutter/issues/128251 This PR includes 3 major updates: - Adding the `commandHasTerminal` parameter for `Event.flutterCommandResult` - In `packages/flutter_tools/lib/src/runner/flutter_command.dart` - Adding the new event for `sendException` from package:usage to be `Event.exception` (this event can be used by all dash tools) - In `packages/flutter_tools/lib/runner.dart` - Migrating the generic `UsageEvent` which was only used for Apple related workflows for iOS and macOS. I did an initial analysis in this [sheet](https://docs.google.com/spreadsheets/d/11KJLkHXFpECMX7tw-trNkYSr5MHDG15XNGv6TgLjfQs/edit?resourcekey=0-j4qdvsOEEg3wQW79YlY1-g#gid=0) to identify all the call sites - Found in several files, highlighted in the sheet above
-
- 20 Sep, 2023 1 commit
-
-
Camille Simon authored
Adds warning to `flutter create` command that checks if detected Java version is compatible with the template AGP and template Gradle versions. If a developer is building for Android and their Java version is incompatible with either the AGP or Gradle versions that Flutter currently supports by default for new Flutter projects, then - a warning will show noting the incompatibility and - steps will be shown to fix the issue, the recommended option being to configure a new compatible Java version given that Flutter knows we can support the template Gradle/AGP versions and updating them manually may be risky (feedback on this approach would be greatly appreciated!) Given that the template AGP and Gradle versions are compatible, this PR assumes that the detected Java version may only conflict with one of the template AGP or Gradle versions because: - the minimum Java version for a given AGP version is less than the maximum Java version compatible for the minimum Gradle version required for that AGP version (too low a Java version will fail AGP compatibility test, but not Gradle compatibility). - the maximum Java version compatible with minimum Gradle version for a given AGP version is higher than minimum Java version required for that AGP version (too high a Java version will fail Gradle compatibility test, but not AGP compatibility test). Fixes https://github.com/flutter/flutter/issues/130515 in the sense that `flutter create foo`; `cd foo`; `flutter run` should always be successful.
-
- 10 Sep, 2023 1 commit
-
-
Daco Harkes authored
Support for FFI calls with `@Native external` functions through Native assets on MacOS and iOS. This enables bundling native code without any build-system boilerplate code. For more info see: * https://github.com/flutter/flutter/issues/129757 ### Implementation details for MacOS and iOS. Dylibs are bundled by (1) making them fat binaries if multiple architectures are targeted, (2) code signing these, and (3) copying them to the frameworks folder. These steps are done manual rather than via CocoaPods. CocoaPods would have done the same steps, but (a) needs the dylibs to be there before the `xcodebuild` invocation (we could trick it, by having a minimal dylib in the place and replace it during the build process, that works), and (b) can't deal with having no dylibs to be bundled (we'd have to bundle a dummy dylib or include some dummy C code in the build file). The dylibs are build as a new target inside flutter assemble, as that is the moment we know what build-mode and architecture to target. The mapping from asset id to dylib-path is passed in to every kernel compilation path. The interesting case is hot-restart where the initial kernel file is compiled by the "inner" flutter assemble, while after hot restart the "outer" flutter run compiled kernel file is pushed to the device. Both kernel files need to contain the mapping. The "inner" flutter assemble gets its mapping from the NativeAssets target which builds the native assets. The "outer" flutter run get its mapping from a dry-run invocation. Since this hot restart can be used for multiple target devices (`flutter run -d all`) it contains the mapping for all known targets. ### Example vs template The PR includes a new template that uses the new native assets in a package and has an app importing that. Separate discussion in: https://github.com/flutter/flutter/issues/131209. ### Tests This PR adds new tests to cover the various use cases. * dev/devicelab/bin/tasks/native_assets_ios.dart * Runs an example app with native assets in all build modes, doing hot reload and hot restart in debug mode. * dev/devicelab/bin/tasks/native_assets_ios_simulator.dart * Runs an example app with native assets, doing hot reload and hot restart. * packages/flutter_tools/test/integration.shard/native_assets_test.dart * Runs (incl hot reload/hot restart), builds, builds frameworks for iOS, MacOS and flutter-tester. * packages/flutter_tools/test/general.shard/build_system/targets/native_assets_test.dart * Unit tests the new Target in the backend. * packages/flutter_tools/test/general.shard/ios/native_assets_test.dart * packages/flutter_tools/test/general.shard/macos/native_assets_test.dart * Unit tests the native assets being packaged on a iOS/MacOS build. It also extends various existing tests: * dev/devicelab/bin/tasks/module_test_ios.dart * Exercises the add2app scenario. * packages/flutter_tools/test/general.shard/features_test.dart * Unit test the new feature flag.
-
- 18 Aug, 2023 1 commit
-
-
Navaron Bracke authored
This PR adjusts the quoting of the project description not not apply twice in the index.html / manifest.json of web builds. *List which issues are fixed by this PR. You must list at least one issue.* Fixes https://github.com/flutter/flutter/issues/131834 *If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
-
- 21 Jul, 2023 1 commit
-
-
Valentin Vignal authored
Fixes https://github.com/flutter/flutter/issues/109775 *If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
-
- 13 Jul, 2023 1 commit
-
-
Matan Lurey authored
Closes https://github.com/flutter/flutter/issues/80013. **Before**: ``` $ flutter create test1 --description "a: b" Creating project test1... Error detected in pubspec.yaml: Error on line 2, column 15: Mapping values are not allowed here. Did you miss a colon earlier? â· 2 â description: a: b â ^ âµ Please correct the pubspec.yaml file at /Users/matan/Developer/scratch/test1/pubspec.yaml ``` **After**: ``` $ flutter create test1 --description "a: b" Creating project test1... Resolving dependencies in test1... Got dependencies in test1. Wrote 129 files. All done! You can find general documentation for Flutter at: https://docs.flutter.dev/ Detailed API documentation is available at: https://api.flutter.dev/ If you prefer video documentation, consider: https://www.youtube.com/c/flutterdev In order to run your application, type: $ cd test1 $ flutter run Your application code is in test1/lib/main.dart. ``` --- It's worth noting that this _always_ escapes a non-empty project description, which means that descriptions that were not previously wrapped in `"`s' will be. I'm not sure how worth it is to do a _conditional_ escape (i.e. only escape if not escaping would cause a problem), but willing to change. Side-note: I had no idea where to list this test in the (very large) `create_test.dart`, so I did my best :)
-
- 23 May, 2023 1 commit
-
-
Ian Hickson authored
Give channel descriptions in `flutter channel`, use branch instead of upstream for channel name (#126936) ## How we determine the channel name Historically, we used the current branch's upstream to figure out the current channel name. I have no idea why. I traced it back to https://github.com/flutter/flutter/pull/446/files where @abarth implement this and I reviewed that PR and left no comment on it at the time. I think this is confusing. You can be on a branch and it tells you that your channel is different. That seems weird. This PR changes the logic to uses the current branch as the channel name. ## How we display channels The main reason this PR exists is to add channel descriptions to the `flutter channel` list: ``` ianh@burmese:~/dev/flutter/packages/flutter_tools$ flutter channel Flutter channels: master (tip of tree, for contributors) main (tip of tree, follows master channel) beta (updated monthly, recommended for experienced users) stable (updated quarterly, for new users and for production app releases) * foo_bar Currently not on an official channel. ianh@burmese:~/dev/flutter/packages/flutter_tools$ ``` ## Other changes I made a few other changes while I was at it: * If you're not on an official channel, we used to imply `--show-all`, but now we don't, we just show the official channels plus yours. This avoids flooding the screen in the case the user is on a weird channel and just wants to know what channel they're on. * I made the tool more consistent about how it handles unofficial branches. Now it's always `[user branch]`. * I slightly adjusted how unknown versions are rendered so it's clearer the version is unknown rather than just having the word "Unknown" floating in the output without context. * Simplified some of the code. * Made some of the tests more strict (checking all output rather than just some aspects of it). * Changed the MockFlutterVersion to implement the FlutterVersion API more strictly. * I made sure we escape the output to `.metadata` to avoid potential injection bugs (previously we just inlined the version and channel name verbatim with no escaping, which is super sketchy). * Tweaked the help text for the `downgrade` command to be clearer. * Removed some misleading text in some error messages. * Made the `.metadata` generator consistent with the template file. * Removed some obsolete code to do with the `dev` branch. ## Reviewer notes I'm worried that there are implications to some of these changes that I am not aware of, so please don't assume I know what I'm doing when reviewing this code. :-)
-
- 21 Mar, 2023 1 commit
-
-
Victoria Ashworth authored
Set plugin template minimum iOS version to 11.0
-
- 13 Mar, 2023 1 commit
-
-
Bartek Pacia authored
[flutter_tools] Clean up `boolArgDeprecated` and `stringArgDeprecated`
-
- 23 Jan, 2023 1 commit
-
-
Michael Goderbauer authored
* dart fix --apply * manual fixes * fix after merge conflicts * review
-
- 24 Oct, 2022 1 commit
-
-
Greg Spencer authored
-
- 08 Sep, 2022 1 commit
-
-
Sigurd Meldgaard authored
-
- 29 Aug, 2022 2 commits
-
-
Zachary Anderson authored
This reverts commit 3802eb62.
-
Sigurd Meldgaard authored
-
- 29 Jul, 2022 1 commit
-
-
Jenn Magder authored
-
- 24 Jun, 2022 1 commit
-
-
Christopher Fujino authored
-
- 18 Jun, 2022 1 commit
-
-
Jonah Williams authored
-
- 25 May, 2022 1 commit
-
-
Jenn Magder authored
-
- 10 May, 2022 1 commit
-
-
Aman Verma authored
-
- 09 May, 2022 1 commit
-
-
Jesús S Guerrero authored
-
- 26 Apr, 2022 1 commit
-
-
Jonah Williams authored
-
- 07 Apr, 2022 1 commit
-
-
Emmanuel Garcia authored
-
- 16 Mar, 2022 1 commit
-
-
Gary Qian authored
-
- 09 Mar, 2022 1 commit
-
-
Jeff Ward authored
-
- 26 Jan, 2022 1 commit
-
-
Daco Harkes authored
-
- 04 Jan, 2022 2 commits
-
-
Zachary Anderson authored
This reverts commit 5257f029.
-
Daco Harkes authored
* Building shared C source code as part of the native build for platforms Android, iOS, Linux desktop, MacOS desktop, and Windows desktop. * Sample code doing a synchronous FFI call. * Sample code doing a long running synchronous FFI call on a helper isolate. * Use of `package:ffigen` to generate the bindings.
-
- 15 Dec, 2021 1 commit
-
-
Emmanuel Garcia authored
-
- 17 Nov, 2021 1 commit
-
-
Danny Tuppeny authored
-
- 04 Nov, 2021 1 commit
-
-
Jenn Magder authored
-
- 02 Nov, 2021 1 commit
-
-
Jenn Magder authored
-
- 20 Oct, 2021 1 commit
-
-
Chris Yang authored
-
- 11 Oct, 2021 1 commit
-
-
Ian Hickson authored
-
- 07 Oct, 2021 1 commit
-
-
Jenn Magder authored
-
- 17 Aug, 2021 1 commit
-
-
Jonah Williams authored
-
- 12 Aug, 2021 1 commit
-
-
Jenn Magder authored
-
- 28 Jun, 2021 1 commit
-
-
Filip Hracek authored
-
- 01 Jun, 2021 1 commit
-
-
Alexandre Ardhuin authored
-
- 15 May, 2021 1 commit
-
-
Chris Bracken authored
Windows package identifiers are globally unique strings, typically a GUID. These are required for templates that require a Windows package name as described in https://docs.microsoft.com/en-us/windows/win32/appxpkg/appx-portal Fixes https://github.com/flutter/flutter/issues/82587
-
- 08 Apr, 2021 1 commit
-
-
Jenn Magder authored
-