- 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.
-
- 31 Aug, 2023 1 commit
-
-
Pierrick Bouvier authored
To implement windows-arm64 support, it is needed to add architecture as a subdirectory (https://github.com/flutter/flutter/issues/129805). In short, when performing a flutter windows build, we have: - Before: build/windows/runner/Release/gallery.exe - After: build/windows/x64/runner/Release/gallery.exe This convention follows what flutter linux build does. Addresses: https://github.com/flutter/flutter/issues/129805 Addresses: https://github.com/flutter/flutter/issues/116196 Design doc: [flutter.dev/go/windows-arm64](https://flutter.dev/go/windows-arm64)
-
- 30 Aug, 2023 2 commits
-
-
-
Parker Lougheed authored
The `.packages` file was deprecated in Dart 2.8 and slowly discontinued until support being fully removed in Dart 2.19. The file will no longer be created, so it can be safely dropped from the generated `.gitignore` files.
-
- 09 Aug, 2023 1 commit
-
-
Victoria Ashworth authored
This PR includes the following changes. These changes only apply to iOS 17 physical devices. | Command | Change Description | Changes to User Experience | | ------------- | ------------- | ------------- | | `flutter run --release` | Uses `devicectl` to install and launch application in release mode. | No change. | | `flutter run` | Uses Xcode via automation scripting to run application in debug and profile mode. | Xcode will be opened in the background. Errors/crashes may be caught in Xcode and therefore may not show in terminal. | | `flutter run --use-application-binary=xxxx` | Creates temporary empty Xcode project and use Xcode to run via automation scripting in debug and profile. | Xcode will be opened in the background. Errors/crashes may be caught in Xcode and therefore may not show in terminal. | | `flutter install` | Uses `devicectl` to check installed apps, install app, uninstall app. | No change. | | `flutter screenshot` | Will return error. | Will return error. | Other changes include: * Using `devicectl` to get information about the device * Using `idevicesyslog` and Dart VM logging for device logs Note: Xcode automation scripting (used in `flutter run` for debug and profile) does not work in a headless (without a UI) interface. No known workaround. Fixes https://github.com/flutter/flutter/issues/128827, https://github.com/flutter/flutter/issues/128531.
-
- 31 Jul, 2023 2 commits
-
-
gmackall authored
Partially fixes/related to: https://github.com/flutter/flutter/issues/131425
-
Donghyun Kim authored
<img width="1119" alt="image" src="https://github.com/flutter/flutter/assets/66480156/e2e8eed1-3bef-436c-b21f-3891bdbe05bb"> In most cases, a FFI plugin doesn't need its own specific Android NDK version. Just following the Flutter app project's NDK version is enough. If a Flutter app project depends on multiple FFI plugins that use different Android NDK versions, it can be quite wasteful and use excessive disk space due to multiple NDK installations. Using Flutter app project's NDK version is also less error-prone because upgrading the Flutter SDK would be enough when upgrading FFI plugins(If project's `ndkVersion` is `flutter.ndkVersion`), without messing with Android NDK installations. This problem was discussed in some actual FFI plugin repositories, and they are striving to find their own solutions: - https://github.com/superlistapp/super_native_extensions/issues/143#issuecomment-1646207706 - https://github.com/cunarist/rust-in-flutter/discussions/60#discussioncomment-6484218 - https://github.com/rive-app/rive-flutter/issues/320 - https://github.com/juicycleff/flutter-unity-view-widget/issues/832
-
- 27 Jul, 2023 1 commit
-
-
David authored
The PR fixes template app documentation
-
- 06 Jul, 2023 1 commit
-
-
fabiancrx authored
[flutter_tools] modify Skeleton template to use ListenableBuilder instead of AnimatedBuilder (#128810) Replaces AnimatedBuilder for ListenableBuilder in the skeleton template Fixes https://github.com/flutter/flutter/issues/128801 No tests needed
-
- 01 Jul, 2023 1 commit
-
-
Parker Lougheed authored
Removes the remaining links to the old linter site, to the guaranteed dart.dev/lints redirect. Contributes to https://github.com/dart-lang/linter/issues/4460 and https://github.com/dart-lang/site-www/issues/4499
-
- 29 Jun, 2023 1 commit
-
-
fzyzcjy authored
Otherwise android studio complains: > Do not use @NonNull in Kotlin; the nullability is already implied by the Kotlin type MethodCall not ending with ? ![image](https://github.com/flutter/flutter/assets/5236035/0cc2e838-dbf9-409f-8fd8-d4e006f58be6)
-
- 20 Jun, 2023 1 commit
-
-
Chris Yang authored
Now that we support UIViewControllerBasedStatusBar by default (after engine roll: https://github.com/flutter/flutter/commit/c7167765d74c1980c9ba750c5750ae27817ad630), we should make this value to be true. Part of https://github.com/flutter/flutter/issues/128969
-
- 06 Jun, 2023 1 commit
-
-
Camille Simon authored
[Android] Update plugin and module templates to use Flutter constant for `compileSdkVersion` (#128073) Updates plugin and module templates to use Flutter constant for `compileSdkVersion`.
-
- 02 Jun, 2023 1 commit
-
-
Midori authored
*Just replaced double quote to single.* *this looks weird to me.* ![screenshot](https://github.com/flutter/flutter/assets/50433979/0bed4730-7fce-411e-b12f-24d478be13c3)
-
- 31 May, 2023 1 commit
-
-
Loïc Sharma authored
Address Tong's feedback here: https://github.com/flutter/flutter/issues/127695#issuecomment-1564884872 Follow-up to: https://github.com/flutter/flutter/pull/127046
-
- 23 May, 2023 1 commit
-
-
Camille Simon authored
Adds `namespace` to module `build.gradle` file templates. Fixes https://github.com/flutter/flutter/issues/126403.
-
- 19 May, 2023 1 commit
-
-
Loïc Sharma authored
## Background The Windows runner has a race at startup: 1. **Platform thread**: creates a hidden window 2. **Platform thread**: launches the Flutter engine 3. **UI/Raster threads**: renders the first frame 4. **Platform thread**: Registers a callback to show the window once the next frame has been rendered. Steps 3 and 4 happen in parallel and it is possible for step 3 to complete before step 4 starts. In this scenario, the next frame callback is never called and the window is never shown. As a result the `windows_startup_test`'s test, which [verifies that the "show window" callback is called](https://github.com/flutter/flutter/blob/1f09a8662dad3bb1959b24e9124e05e2b9dbff1d/dev/integration_tests/windows_startup_test/windows/runner/flutter_window.cpp#L60-L64), can flake if the first frame is rendered before the show window callback has been registered. ## Solution This change makes the runner schedule a frame after it registers the next frame callback. If step 3 hasn't completed yet, this no-ops as a frame is already scheduled. If step 3 has already completed, a new frame will be rendered, which will call the next frame callback and show the window. Part of https://github.com/flutter/flutter/issues/119415 See this thread for alternatives that were considered: https://github.com/flutter/engine/pull/42061#issuecomment-1550080722
-
- 12 May, 2023 1 commit
-
-
stuartmorgan authored
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
-
- 05 May, 2023 1 commit
-
-
Alberto Azinar authored
This PR removed the non-necessary required Koltin dependency. This is because the Kotlin Gradle adds the dependency on the standard library automatically. Fixes #98212 *If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy]. *
-
- 02 May, 2023 1 commit
-
-
Jenn Magder authored
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.
-
- 28 Apr, 2023 1 commit
-
-
yaakovschectman authored
~Update the windows app template and migration to use `CMP0135` when cmake version is >= 3.24.~ Update app templates' and examples' CMakeLists.txt to use `cmake_policy(VERSION`. https://github.com/flutter/packages/pull/3828 should obviate the need for a migration. Addresses https://github.com/flutter/flutter/issues/116866 ## 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]. - [ ] 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
-
- 27 Apr, 2023 1 commit
-
-
Dan Field authored
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.
-
- 19 Apr, 2023 1 commit
-
-
Bartek Pacia authored
Refactor Flutter Gradle Plugin so it can be applied using the declarative `plugins {}` block (#123511) This PR aims to resolve #121552. Resources used: - [Developing Plugins](https://docs.gradle.org/current/userguide/custom_plugins.html) - [Using Gradle Plugins](https://docs.gradle.org/current/userguide/plugins.html#sec:plugins_block) - [Composite Builds Plugin Development Sample](https://docs.gradle.org/current/samples/sample_composite_builds_plugin_development.html) This PR also paves way for #121541, because apps will no longer have: ```groovy apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" ``` hardcoded. Instead, they'll use: ```groovy plugins { // ... id "dev.flutter.flutter-gradle-plugin" // the exact name is tentative } ```
-
- 14 Apr, 2023 1 commit
-
-
Kevin Moore authored
flutter-tool, web: update HTML template serviceWorkerVersion to be const
-
- 06 Apr, 2023 1 commit
-
-
Ian Hickson authored
Deprecate these old APIs
-
- 05 Apr, 2023 1 commit
-
-
Chris Bracken authored
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
-
- 29 Mar, 2023 1 commit
-
-
Bartek Pacia authored
Fix warning in `flutter create`d project ("package attribute is deprecated" in AndroidManifest) (#123426) Fix warning in `flutter create`d project ("package attribute is deprecated" in AndroidManifest)
-
- 28 Mar, 2023 1 commit
-
-
Chris Bracken authored
[macOS] Eliminate explicit main window init()
-
- 21 Mar, 2023 2 commits
-
-
Bartek Pacia authored
Fix Gradle warning in a freshly `flutter create`ed Android project
-
Victoria Ashworth authored
Set plugin template minimum iOS version to 11.0
-
- 17 Mar, 2023 2 commits
-
-
Greg Spencer authored
Revert unintentional changes to Info.plist files
-
Greg Spencer authored
Add support for application exit requests
-
- 16 Mar, 2023 1 commit
-
-
Greg Spencer authored
Add macos project auto migration code for FlutterApplication
-
- 23 Feb, 2023 1 commit
-
-
Lioness100 authored
* Fix typos * lowercase animated & opacity * Undo typo fix --------- Co-authored-by:
Michael Goderbauer <goderbauer@google.com>
-
- 16 Feb, 2023 1 commit
-
-
Alex Li authored
-
- 15 Feb, 2023 2 commits
-
-
stuartmorgan authored
* 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
-
stuartmorgan authored
* Add Java tests * Add Kotlin * Add integration testing * Add cerate tests
-
- 13 Feb, 2023 1 commit
-
-
Tomasz Gucio authored
--------- Co-authored-by:
schectman <schectman@google.com>
-
- 02 Feb, 2023 1 commit
-
-
Greg Spencer authored
* Update the counter app to enable Material 3 * Fix tools tests * Update some wording * Revert all but useMaterial3 * Update comments
-
- 24 Jan, 2023 1 commit
-
-
stuartmorgan authored
* 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
-