Derek Xu
eff2e7dbb1
Unpin package:vm_service ( #141279 )
2024-01-10 12:47:25 -05:00
stuartmorgan
32fd2cbf73
Replace deprecated exists
in podhelper.rb ( #141169 )
...
The recently landed https://github.com/flutter/flutter/pull/140222 accidentally used the deprecated `exists?` instead of the non-deprecated `exist?` (which other code in this file is already, correctly, using).
Fixes https://github.com/flutter/flutter/issues/141167
2024-01-09 22:25:57 +00:00
Polina Cherkasova
1f3103e50d
Upgrade leak_tracker. ( #141153 )
2024-01-09 12:02:35 -08:00
Daco Harkes
b2ef2802d2
Native assets support for Android Add2app ( #140802 )
...
Support for FFI calls with @Native external functions through Native assets on Android add to app. 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 Android add2app
The `.so` files are bundled with the same mechanism that bundles `libapp.so`.
2024-01-09 08:47:53 +00:00
Christopher Fujino
6edbce9e07
Manual pub roll pinning web socket channel ( #141040 )
...
Work around https://github.com/flutter/flutter/issues/141032
Otherwise a re-land of https://github.com/flutter/flutter/pull/140979
Fixes https://github.com/flutter/flutter/issues/137163 & https://github.com/flutter/flutter/issues/139181
2024-01-05 22:29:58 +00:00
Andrew Kolos
e90e4888b8
in flutter run
, throw tool exit when --flavor
is provided but is not supported on the target device ( #139045 )
...
Fixes https://github.com/flutter/flutter/issues/134197
2024-01-05 21:47:58 +00:00
Andrew Kolos
8c11aa030d
add flavor-conditional asset bundling support to flutter test
( #140944 )
...
Fixes https://github.com/flutter/flutter/issues/140932
2024-01-05 21:47:55 +00:00
TabooSun
e8436970e6
Gen l10n add named argument option ( #138663 )
...
Add an option to use named argument for generated method.
Fix #116308
2024-01-05 21:28:08 +00:00
auto-submit[bot]
c2286a7642
Reverts "manual pub roll to pick up dds fixes" ( #141033 )
...
Reverts flutter/flutter#140979
Initiated by: loic-sharma
This change reverts the following previous change:
Original Description:
Fixes https://github.com/flutter/flutter/issues/137163
Fixes https://github.com/flutter/flutter/issues/139181
2024-01-05 19:10:19 +00:00
Danny Tuppeny
2d3166b7f9
Pin package:vm_service ( #140972 )
...
vm_service 14 should not be used yet (see
https://github.com/flutter/flutter/pull/140916#issuecomment-1877383354 )
but when trying to unpin pkg:test it was upgraded. This pins it to
v13.0.0.
2024-01-04 21:10:44 +00:00
Christopher Fujino
e256d49117
manual pub roll to pick up dds fixes ( #140979 )
...
Fixes https://github.com/flutter/flutter/issues/137163
Fixes https://github.com/flutter/flutter/issues/139181
2024-01-04 19:43:06 +00:00
stuartmorgan
24e06232a7
Fix local engine use in macOS plugins ( #140222 )
...
Currently podhelper.rb will always point plugin builds at the cached engine artifacts, even when using `--local-engine`. In most cases this is fine, since when the final build actually runs it will be using the engine bundled into the app build, which will be the correct local engine build. When trying to test a local engine build with API additions against a local plugin modified to use those additions to ensure that they are working as expected, however, compilation will fail, because the new APIs won't be present in the plugin build.
This fixes that for macOS, and adds a TODO for iOS (which is more complicated to fix due to the host vs target build distinction).
macOS portion of https://github.com/flutter/flutter/issues/132228
2024-01-04 15:40:08 +00:00
Jenn Magder
5d4f5f77b8
Remove deprecated bitcode stripping from tooling ( #140903 )
...
Bitcode has been removed https://github.com/flutter/flutter/issues/107887 , clean up the leftover commands.
2024-01-03 23:15:23 +00:00
Jenn Magder
076cb8a328
Migrate Xcode projects last version checks to Xcode 15.1 ( #140256 )
...
Change the following in the `flutter create` templates. I didn't make any auto-migrations for existing apps because none seem that critical:
1. Turn on `ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS` in iOS and macOS.
1. Turn on `BuildIndependentTargetsInParallel` in macOS template. https://github.com/flutter/flutter/pull/125827/files#r1181817619
1. Turn on `DEAD_CODE_STRIPPING` in macOS template.
1. Set `ENABLE_USER_SCRIPT_SANDBOXING=NO` in iOS and macOS template. `flutter` scripts don't work with this on. This might require a migration in the future to explicitly turn this one off. However at least for now if the setting isn't present it defaults to `NO`.
Add migration for `LastUpgradeVersion` so users won't see these validation issues in Xcode.
Run migrator on all the example apps. A few aren't Flutter apps so I edited them in Xcode.
Fixes https://github.com/flutter/flutter/issues/140253
See also https://github.com/flutter/flutter/issues/125817 and https://github.com/flutter/flutter/pull/90304 .
2024-01-03 23:05:46 +00:00
Jonah Williams
0d378ed5ab
[flutter_tools] add support for --enable-impeller to test device. ( #140899 )
...
This allows unit tests to use the impeller backend, which can be useful for Scubas/golden tests.
2024-01-03 19:14:49 +00:00
Elliott Brooks
55ba27d3bc
Link to wiki page about updating dependencies in each pubspec.yaml
file ( #140826 )
...
Added a minimal wiki page about how to use the `update-packages` tool: https://github.com/flutter/flutter/wiki/Updating-dependencies-in-Flutter
This PR adds a link to that wiki page at the top of each pubspec.yaml file
2024-01-03 18:28:52 +00:00
Jenn Magder
b08fc60024
Set template and migrate apps to iOS 12 minimum ( #140823 )
...
Reland https://github.com/flutter/flutter/pull/140478 with `ios_content_validation_test` test fix.
```
[ios_content_validation_test] Process terminated with exit code 0.
Task result:
{
"success": true,
"data": null,
"detailFiles": [],
"benchmarkScoreKeys": [],
"reason": "success"
}
```
__________
1. Change templates to `IPHONEOS_DEPLOYMENT_TARGET`, `MinimumOSVersion`, and Podfile `platform :ios` to 12.0.
2. Add migrator for Podfile part to migrate `platform :ios, '11.0'` -> `platform :ios, '12.0'`
3. Compile with `-miphoneos-version-min=12.0`
4. Run the migrator on all example apps and integration tests.
See also https://github.com/flutter/flutter/pull/62902 and https://github.com/flutter/flutter/pull/85174 and https://github.com/flutter/flutter/pull/101963
Fixes https://github.com/flutter/flutter/issues/136060
2024-01-03 00:47:40 +00:00
Andrew Kolos
3ac2dba58d
Fix setup race in asset bundle tests ( #140832 )
...
Fixes https://github.com/flutter/flutter/issues/140665 by replacing use of `setUpAll` and `teardownAll` with `setUp` and `teardown` respectively.
My theory has to how this issue happened (and how this PR fixes it) is that `setUpAll` is not guaranteed to run after any `setUp` in any parent test groups. However, `setUp` is guaranteed to run after any set-up callbacks in parent groups. From the [documentation](https://api.flutter.dev/flutter/flutter_test/setUp.html ):
> If this is called within a test group, it applies only to tests in that group. The body will be run after any set-up callbacks in parent groups or at the top level.
Meanwhile, [`setUpAll`](https://api.flutter.dev/flutter/flutter_test/setUpAll.html ) has a weaker documented guarantee that applies only to other `setUpAll` calls:
> If this is called within a test group, The body will run before all tests in that group. It will be run after any [setUpAll](https://api.flutter.dev/flutter/flutter_test/setUpAll.html ) callbacks in parent groups or at the top level. It won't be run if none of the tests in the group are run.
2024-01-03 00:15:51 +00:00
Polina Cherkasova
45c611f040
Upgrade leak_tracker. ( #140758 )
2024-01-02 20:58:16 +00:00
auto-submit[bot]
bd634f3298
Reverts "Set template and migrate apps to iOS 12 minimum" ( #140822 )
...
Reverts flutter/flutter#140478
Initiated by: loic-sharma
This change reverts the following previous change:
Original Description:
1. Change templates to `IPHONEOS_DEPLOYMENT_TARGET`, `MinimumOSVersion`, and Podfile `platform :ios` to 12.0.
2. Add migrator for Podfile part to migrate `platform :ios, '11.0'` -> `platform :ios, '12.0'`
3. Compile with `-miphoneos-version-min=12.0`
4. Run the migrator on all example apps and integration tests.
See also https://github.com/flutter/flutter/pull/62902 and https://github.com/flutter/flutter/pull/85174 and https://github.com/flutter/flutter/pull/101963
Fixes https://github.com/flutter/flutter/issues/136060
2024-01-02 20:49:19 +00:00
Elliott Brooks
cb07292f57
Update dependencies with flutter update-packages --force-upgrade
( #140810 )
2024-01-02 12:10:10 -08:00
Jenn Magder
acdbcadb9e
Set template and migrate apps to iOS 12 minimum ( #140478 )
...
1. Change templates to `IPHONEOS_DEPLOYMENT_TARGET`, `MinimumOSVersion`, and Podfile `platform :ios` to 12.0.
2. Add migrator for Podfile part to migrate `platform :ios, '11.0'` -> `platform :ios, '12.0'`
3. Compile with `-miphoneos-version-min=12.0`
4. Run the migrator on all example apps and integration tests.
See also https://github.com/flutter/flutter/pull/62902 and https://github.com/flutter/flutter/pull/85174 and https://github.com/flutter/flutter/pull/101963
Fixes https://github.com/flutter/flutter/issues/136060
2024-01-02 19:42:13 +00:00
Dan Field
bfdc32fcd0
Revert "[Impeller] Plumb through the impeller-force-gl flag." ( #140535 )
...
Reverts flutter/flutter#123828
Fixes https://github.com/flutter/flutter/issues/140523
2024-01-02 18:28:04 +00:00
Zachary Anderson
ddb8d1f670
Makes the flutter tool retry on a bad gateway network error from gradle ( #140670 )
...
Seen in https://github.com/flutter/flutter/issues/140643
2023-12-27 20:13:36 +00:00
Zachary Anderson
6664dfec2f
Disable random test order in asset_bundle_test.dart ( #140666 )
...
For https://github.com/flutter/flutter/issues/140665
2023-12-27 18:06:31 +00:00
Reid Baker
48ae5ff6f6
Use double quotes over single quotes in gradle build files ( #140512 )
...
Following https://developer.android.com/build/migrate-to-kotlin-dsl
2/n Use double quotes instead of single quotes.
Should be a no-op change. If you see a behavioral change please flag it.
2023-12-22 16:25:06 +00:00
Andrew Kolos
9e104eb7c8
Fix flavor conditional asset bundling for macos ( #140433 )
...
Fixes https://github.com/flutter/flutter/issues/140430
Fixes https://github.com/flutter/flutter/issues/140432 while we are at it
2023-12-21 20:30:21 +00:00
Christopher Fujino
674fbd26bc
[flutter_tools] Ensure flutter daemon clients can detect preview device ( #140112 )
...
Part of https://github.com/flutter/flutter/issues/130277
2023-12-21 19:01:16 +00:00
Gustl22
f5ac225c8d
Reland: "Fix how Gradle resolves Android plugin" ( #137115 )
...
Relands #97823
When the tool migrated to `.flutter-plugins-dependencies`, the Gradle plugin was never changed.
Until now, the plugin had the heuristic that a plugin with a `android/build.gradle` file supported the Android platform.
Also applies schema of `getPluginDependencies` to `getPluginList` which uses a `List` of Object instead of `Properties`.
Fixes #97729
Cause of the error: 5f105a6ca7/packages/flutter_tools/gradle/flutter.gradle (L421C25-L421C25)
Fixes #98048
The deprecated line `include ":$name"` in `settings.gradle` (pluginEach) in old projects causes the `project.rootProject.findProject` to also find the plugin "project", so it is not failing on the `afterEvaluate` method. But the plugin shouldn't be included in the first place as it fails with `Could not find method implementation() for arguments` error in special cases.
Related to #48918 , see [_writeFlutterPluginsListLegacy](27bc1cf61a/packages/flutter_tools/lib/src/flutter_plugins.dart (L248)
).
Co-authored-by: Emmanuel Garcia <egarciad@google.com>
2023-12-21 16:55:04 +00:00
Michael Goderbauer
68e346e41c
Remove outdated ignores from tool ( #140467 )
...
These were not ignoring anything (anymore).
2023-12-20 22:14:32 +00:00
Reid Baker
d6e435a7ac
Part 1/n migration steps for kotlin migration ( #140452 )
...
Following https://developer.android.com/build/migrate-to-kotlin-dsl
1/n Add parentheses to method calls
Should be a no-op change. If you see a behavioral change please flag it.
2023-12-20 20:40:17 +00:00
Gustl22
da0cd69659
Revert automated changes made to deprecated settings.gradle (plugins.each) ( #140037 )
...
Restore testing deprecated settings.gradle (plugins.each).
Updated presumably by accident in #83067
Split from #137115
See also https://github.com/flutter/flutter/pull/137115#issuecomment-1781909865
2023-12-20 15:45:08 +00:00
Christopher Fujino
ef1227f05d
[flutter_tools] handle FileSystemException trying to delete temp directory from core_devices.dart ( #140415 )
...
Fixes https://github.com/flutter/flutter/issues/140416 , the top crasher on stable/3.16.4
2023-12-20 00:08:54 +00:00
Bartek Pacia
a1e1dc3f6c
Reland "Warn when Gradle plugins are applied using the legacy apply script method ( #140103 )
...
> This PR relands #139690 which was reverted in #140102
This PR adds a deprecation message when Android build is using the legacy "apply script method" way of applying Flutter's Gradle plugins (that is: [`flutter.gradle`](https://github.com/flutter/flutter/blob/3.16.0/packages/flutter_tools/gradle/flutter.gradle ) and [`app_plugin_loader.gradle`](https://github.com/flutter/flutter/blob/3.16.0/packages/flutter_tools/gradle/app_plugin_loader.gradle )).
See also:
- #121541
- in particular https://github.com/flutter/flutter/issues/121541#issuecomment-1836947311
- #135392
- and PR that add the migration guide: [#9857 ](https://github.com/flutter/website/pull/9857 )
- I think either `logger.error` or `logger.quiet` must be used, because all other error levels are not shown during `flutter build apk` (and that's what most people use).
2023-12-19 16:03:23 +00:00
Polina Cherkasova
6368d65622
Upgrade to version of leak tracker that does not depend on test_widgets. ( #140247 )
...
Contributes to: https://github.com/flutter/flutter/issues/135856
2023-12-19 04:28:09 +00:00
raphire08
4659b0c402
refactored cli tool ipa method name to support --export-options-plist ( #138555 )
...
This PR changes the way the IPA method is read in the run command for `build ipa` command. If export options plist argument is provided it takes method name from plist, otherwise it uses the method name from export method argument.
*List which issues are fixed by this PR. You must list at least one issue. An issue is not required if the PR fixes something trivial like a typo.*
fixes [#122179 ](https://github.com/flutter/flutter/issues/122179 )
2023-12-18 08:56:07 +00:00
Xilai Zhang
c1762215ad
[github actions] minor PR to test latest github actions ( #140252 )
...
Minor fix of a typo.
A merged PR on flutter/flutter with a newer base commit is needed to test the latest version of https://github.com/flutter/flutter/blob/master/.github/workflows/easy-cp.yml . (more details in https://github.com/flutter/flutter/pull/140191#issuecomment-1857169933 ).
This PR has a base commit that includes the latest updates to easy-cp.yml, and would be a good candidate for testing purposes when merged
2023-12-16 03:31:21 +00:00
Elias Yishak
d180c12705
Use new enabledFeature
param for Analytics
( #139934 )
...
Related to tracker issue:
- https://github.com/flutter/flutter/issues/128251
This updates the `Analytics` constructor to provide it with the enabled features for the flutter-tool. This will be sent with each event for the flutter-tool.
2023-12-15 19:58:05 +00:00
Polina Cherkasova
bda158adf0
Reorganize dependencies on leak_tracker. ( #140233 )
...
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
2023-12-15 19:33:23 +00:00
Chris Bracken
d0670f0591
[macOS,iOS] CocoaPods recommended version: 1.13.0 ( #135447 )
...
Due to changes in Xcode 15, several variables such as `DT_TOOLCHAIN_DIR`
have been eliminateed in favour of others such as `TOOLCHAIN_DIR`. This
broke CocoaPods support under Xcode 15, as reported in:
https://github.com/CocoaPods/CocoaPods/issues/12012
@vashworth worked around this in Flutter in:
https://github.com/flutter/flutter/pull/132803
The CocoaPods issue was resolved by the following PR to their repo:
https://github.com/CocoaPods/CocoaPods/pull/12009
and was released in CocoaPods 1.13.0.
Also switches from an if-else chain to a switch for CocoaPodsStatus
handling.
Related: https://github.com/flutter/flutter/issues/133584
Related: https://github.com/flutter/flutter/issues/132755
## 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: Greg Spencer <gspencergoog@users.noreply.github.com>
2023-12-15 11:16:52 -08:00
Polina Cherkasova
6a85684877
Increase versions of leak tracker libraries. ( #140018 )
...
Contributes to https://github.com/flutter/flutter/issues/135856
2023-12-15 05:18:23 +00:00
Gustl22
fc77dd90d4
Adapt wording for required Android SDK for plugins ( #140043 )
...
Solves https://github.com/flutter/flutter/pull/137115#discussion_r1388251047
2023-12-14 05:45:15 +00:00
Andrew Kolos
935775cb74
[reland] Support conditional bundling of assets based on --flavor
( #139834 )
...
Reland of https://github.com/flutter/flutter/pull/132985 . Fixes the path to AssetManifest.bin in flavors_test_ios
2023-12-14 05:30:10 +00:00
Daco Harkes
3b370c8539
[deps] update Android SDK to 34 ( #138183 )
...
Update Android SDK from 33 to 34.
Following the engine update:
* https://github.com/flutter/engine/pull/47839
2023-12-14 00:55:57 +00:00
Lau Ching Jun
c1caa24aa4
Optimize file transfer when using proxied devices. ( #139968 )
...
List of changes:
1. Optimizations in FileTransfer. a. Use `stream.forEach` instead of `await for`. b. Type cast `List<int>` to `Uint8List` instead of using `Uint8List.fromList` results in (presumably) fewer copy and faster execution. c. Iterate through `Uint8List` with regular for loop instead of for-in loop.
2. Precache the block hashes of a file, and reuse it on subsequent runs.
2023-12-14 00:11:32 +00:00
Reid Baker
3c80cc7eb9
Do not use project in do last ( #139325 )
...
- Use copy task that branches for 8.3 and above to avoid using project.exec in a dolast block.
part 1/n for flutter/flutter/issues/138523
This PR does not test the 8.3 branch but instead builds the ability to write a branching gradle test.
After fixing this project.exec action there I discovered a second that needs to be removed or migrated in order for the build to work.
Related reading https://docs.gradle.org/8.0/userguide/configuration_cache.html#config_cache:requirements
https://docs.gradle.org/current/javadoc/org/gradle/process/ExecOperations.html (not used but considered)
https://docs.gradle.org/8.2/dsl/org.gradle.api.tasks.Copy.html#org.gradle.api.tasks.Copy:fileMode
2023-12-13 23:47:58 +00:00
auto-submit[bot]
625bc50c39
Reverts "Warn when Gradle plugins are applied using the legacy "apply script method" way" ( #140102 )
...
Reverts flutter/flutter#139690
Initiated by: hellohuanlin
This change reverts the following previous change:
Original Description:
This PR adds a deprecation message when Android build is using the legacy "apply script method" way of applying Flutter's Gradle plugins (that is: [`flutter.gradle`](https://github.com/flutter/flutter/blob/3.16.0/packages/flutter_tools/gradle/flutter.gradle ) and [`app_plugin_loader.gradle`](https://github.com/flutter/flutter/blob/3.16.0/packages/flutter_tools/gradle/app_plugin_loader.gradle )).
See also:
- #121541
- in particular https://github.com/flutter/flutter/issues/121541#issuecomment-1836947311
- #135392
- and PR that add the migration guide: [#9857 ](https://github.com/flutter/website/pull/9857 )
- I think either `logger.error` or `logger.quiet` must be used, because all other error levels are not shown during `flutter build apk` (and that's what most people use).
2023-12-13 23:08:25 +00:00
Bartek Pacia
4aef59befb
Warn when Gradle plugins are applied using the legacy "apply script method" way ( #139690 )
...
This PR adds a deprecation message when Android build is using the legacy "apply script method" way of applying Flutter's Gradle plugins (that is: [`flutter.gradle`](https://github.com/flutter/flutter/blob/3.16.0/packages/flutter_tools/gradle/flutter.gradle ) and [`app_plugin_loader.gradle`](https://github.com/flutter/flutter/blob/3.16.0/packages/flutter_tools/gradle/app_plugin_loader.gradle )).
See also:
- #121541
- in particular https://github.com/flutter/flutter/issues/121541#issuecomment-1836947311
- #135392
- and PR that add the migration guide: [#9857 ](https://github.com/flutter/website/pull/9857 )
- I think either `logger.error` or `logger.quiet` must be used, because all other error levels are not shown during `flutter build apk` (and that's what most people use).
2023-12-13 20:45:56 +00:00
Gray Mackall
9a72e1c699
Allow plugins to use compileSdkPreview ( #131901 )
...
Fixes https://github.com/flutter/flutter/issues/124748
Based (heavily) off https://github.com/flutter/flutter/pull/104662
2023-12-12 20:06:04 +00:00
flutter-pub-roller-bot
e278279a48
Roll pub packages ( #139969 )
...
This PR was generated by `flutter update-packages --force-upgrade`.
2023-12-12 10:12:26 +00:00