Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit b2bb539

Browse files
Merge branch 'flutter:main' into position
2 parents c38f3b9 + 89ad5a9 commit b2bb539

File tree

205 files changed

+6280
-4263
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

205 files changed

+6280
-4263
lines changed

.ci.yaml

Lines changed: 85 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ targets:
4545
# pod's arch exclusions, so fails to build.
4646
- name: Mac_x64 lint_podspecs
4747
recipe: plugins/plugins
48-
bringup: true # New target: https://github.com/flutter/plugins/pull/6637
4948
timeout: 30
5049
properties:
5150
add_recipes_cq: "true"
@@ -57,7 +56,6 @@ targets:
5756
# on Intel to give us build coverage of both host types.
5857
- name: Mac_x64 build_all_plugins master
5958
recipe: plugins/plugins
60-
bringup: true # New target: https://github.com/flutter/plugins/pull/6671
6159
timeout: 30
6260
properties:
6361
add_recipes_cq: "true"
@@ -67,14 +65,98 @@ targets:
6765

6866
- name: Mac_x64 build_all_plugins stable
6967
recipe: plugins/plugins
70-
bringup: true # New target: https://github.com/flutter/plugins/pull/6671
7168
timeout: 30
7269
properties:
7370
add_recipes_cq: "true"
7471
version_file: flutter_stable.version
7572
target_file: mac_build_all_plugins.yaml
7673
channel: stable
7774

75+
### iOS tasks ###
76+
# TODO(stuartmorgan): Swap this and ios-build_all_plugins once simulator
77+
# tests are reliable on the ARM infrastructure. See discussion at
78+
# https://github.com/flutter/plugins/pull/5693#issuecomment-1126011089
79+
- name: Mac_x64 ios_platform_tests_1_of_4 master
80+
recipe: plugins/plugins
81+
timeout: 30
82+
properties:
83+
add_recipes_cq: "true"
84+
version_file: flutter_master.version
85+
target_file: mac_ios_platform_tests.yaml
86+
package_sharding: "--shardIndex 0 --shardCount 4"
87+
88+
- name: Mac_x64 ios_platform_tests_2_of_4 master
89+
recipe: plugins/plugins
90+
timeout: 30
91+
properties:
92+
add_recipes_cq: "true"
93+
version_file: flutter_master.version
94+
target_file: mac_ios_platform_tests.yaml
95+
package_sharding: "--shardIndex 1 --shardCount 4"
96+
97+
- name: Mac_x64 ios_platform_tests_3_of_4 master
98+
recipe: plugins/plugins
99+
timeout: 30
100+
properties:
101+
add_recipes_cq: "true"
102+
version_file: flutter_master.version
103+
target_file: mac_ios_platform_tests.yaml
104+
package_sharding: "--shardIndex 2 --shardCount 4"
105+
106+
- name: Mac_x64 ios_platform_tests_4_of_4 master
107+
recipe: plugins/plugins
108+
timeout: 30
109+
properties:
110+
add_recipes_cq: "true"
111+
version_file: flutter_master.version
112+
target_file: mac_ios_platform_tests.yaml
113+
package_sharding: "--shardIndex 3 --shardCount 4"
114+
115+
# Don't run full platform tests on both channels in pre-submit.
116+
- name: Mac_x64 ios_platform_tests_1_of_4 stable
117+
recipe: plugins/plugins
118+
presubmit: false
119+
timeout: 30
120+
properties:
121+
channel: stable
122+
add_recipes_cq: "true"
123+
version_file: flutter_stable.version
124+
target_file: mac_ios_platform_tests.yaml
125+
package_sharding: "--shardIndex 0 --shardCount 4"
126+
127+
- name: Mac_x64 ios_platform_tests_2_of_4 stable
128+
recipe: plugins/plugins
129+
presubmit: false
130+
timeout: 30
131+
properties:
132+
channel: stable
133+
add_recipes_cq: "true"
134+
version_file: flutter_stable.version
135+
target_file: mac_ios_platform_tests.yaml
136+
package_sharding: "--shardIndex 1 --shardCount 4"
137+
138+
- name: Mac_x64 ios_platform_tests_3_of_4 stable
139+
recipe: plugins/plugins
140+
presubmit: false
141+
timeout: 30
142+
properties:
143+
channel: stable
144+
add_recipes_cq: "true"
145+
version_file: flutter_stable.version
146+
target_file: mac_ios_platform_tests.yaml
147+
package_sharding: "--shardIndex 2 --shardCount 4"
148+
149+
- name: Mac_x64 ios_platform_tests_4_of_4 stable
150+
recipe: plugins/plugins
151+
presubmit: false
152+
timeout: 30
153+
properties:
154+
channel: stable
155+
add_recipes_cq: "true"
156+
version_file: flutter_stable.version
157+
target_file: mac_ios_platform_tests.yaml
158+
package_sharding: "--shardIndex 3 --shardCount 4"
159+
78160
- name: Windows win32-platform_tests master
79161
recipe: plugins/plugins
80162
timeout: 30

.ci/flutter_master.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
d3dcd7d532b61f43118ab8031bf732aea4a7a9f5
1+
b2672fe8355fb9c394f79e6156a56ec57686c912

.ci/flutter_stable.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
e99c9c7cd9f6c0b2f8ae6e3ebfd585239f5568f4
1+
b8f7f1f9869bb2d116aa6a70dbeac61000b52849

.ci/scripts/create_simulator.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
# Copyright 2013 The Flutter Authors. All rights reserved.
3+
# Use of this source code is governed by a BSD-style license that can be
4+
# found in the LICENSE file.
5+
6+
device=com.apple.CoreSimulator.SimDeviceType.iPhone-11
7+
os=com.apple.CoreSimulator.SimRuntime.iOS-16-0
8+
9+
xcrun simctl list
10+
xcrun simctl create Flutter-iPhone "$device" "$os" | xargs xcrun simctl boot
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
tasks:
2+
- name: create simulator
3+
script: .ci/scripts/create_simulator.sh
4+
- name: build examples
5+
script: script/tool_runner.sh
6+
args: ["build-examples", "--ios"]
7+
- name: xcode analyze
8+
script: script/tool_runner.sh
9+
args: ["xcode-analyze", "--ios"]
10+
- name: xcode analyze deprecation
11+
# Ensure we don't accidentally introduce deprecated code.
12+
script: script/tool_runner.sh
13+
args: ["xcode-analyze", "--ios", "--ios-min-version=13.0"]
14+
- name: native test
15+
script: script/tool_runner.sh
16+
args: ["native-test", "--ios", "--ios-destination", "platform=iOS Simulator,name=iPhone 11,OS=latest"]
17+
- name: drive examples
18+
# `drive-examples` contains integration tests, which changes the UI of the application.
19+
# This UI change sometimes affects `xctest`.
20+
# So we run `drive-examples` after `native-test`; changing the order will result ci failure.
21+
script: script/tool_runner.sh
22+
args: ["drive-examples", "--ios", "--exclude=script/configs/exclude_integration_ios.yaml"]

.cirrus.yml

Lines changed: 17 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,23 @@
1-
gcp_credentials: ENCRYPTED[!f1177d1ddb5330ffaa9ea11c9c9e8e0c542185e895c36071f18cec923dd31c50ece6d18da89c2f6f1cd2d1a98d0c2eea!]
1+
gcp_credentials: ENCRYPTED[!9e38557f08108136b3625b7e62c64cc9eccc50365ffeaaa55c6be52f1d8fd6225af5badc69983ca08484274f02f34424!]
22

33
# Run on PRs and main branch post submit only. Don't run tests when tagging.
44
only_if: $CIRRUS_TAG == '' && ($CIRRUS_PR != '' || $CIRRUS_BRANCH == 'main')
55
env:
66
CHANNEL: "master" # Default to master when not explicitly set by a task.
77
PLUGIN_TOOL_COMMAND: "dart ./script/tool/bin/flutter_plugin_tools.dart"
88

9+
install_chrome_linux_template: &INSTALL_CHROME_LINUX
10+
env:
11+
CHROME_NO_SANDBOX: true
12+
CHROME_DOWNLOAD_DIR: /tmp/chromium
13+
CHROME_EXECUTABLE: $CHROME_DOWNLOAD_DIR/chrome-linux/chrome
14+
CHROMEDRIVER_EXECUTABLE: $CHROME_DOWNLOAD_DIR/chromedriver/chromedriver
15+
PATH: $PATH:$CHROME_DOWNLOAD_DIR/chrome-linux
16+
install_chromium_script:
17+
# Install a pinned version of Chromium and its corresponding ChromeDriver.
18+
# Setting CHROME_EXECUTABLE above causes this version to be used for tests.
19+
- ./script/install_chromium.sh
20+
921
tool_setup_template: &TOOL_SETUP_TEMPLATE
1022
tool_setup_script:
1123
- .ci/scripts/prepare_tool.sh
@@ -245,7 +257,7 @@ task:
245257
CHANNEL: "master"
246258
CHANNEL: "stable"
247259
MAPS_API_KEY: ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550]
248-
GCLOUD_FIREBASE_TESTLAB_KEY: ENCRYPTED[30e6cf7189e3ff3868edc25d2e638ef2aec70546456427064bbc74b297d36145364f49f9d26b327787a59df149d69262]
260+
GCLOUD_FIREBASE_TESTLAB_KEY: ENCRYPTED[4457646586de940f49e054de7d82e60078b205ac627f11a89d077e63f639c9ba1002541d9209a9ee7777e159e97b43d0]
249261
build_script:
250262
- ./script/tool_runner.sh build-examples --apk
251263
lint_script:
@@ -258,9 +270,7 @@ task:
258270
firebase_test_lab_script:
259271
- if [[ -n "$GCLOUD_FIREBASE_TESTLAB_KEY" ]]; then
260272
- echo $GCLOUD_FIREBASE_TESTLAB_KEY > ${HOME}/gcloud-service-key.json
261-
# (TODO)cyanglaz: add --device model=starqlteue,version=26 back when the device issue is fixed in FTL.
262-
# https://github.com/flutter/flutter/issues/114535
263-
- ./script/tool_runner.sh firebase-test-lab --device model=redfin,version=30 --exclude=script/configs/exclude_integration_android.yaml
273+
- ./script/tool_runner.sh firebase-test-lab --device model=redfin,version=30 --device model=starqlteue,version=26 --exclude=script/configs/exclude_integration_android.yaml
264274
- else
265275
- echo "This user does not have permission to run Firebase Test Lab tests."
266276
- fi
@@ -286,16 +296,9 @@ task:
286296
matrix:
287297
CHANNEL: "master"
288298
CHANNEL: "stable"
289-
CHROME_NO_SANDBOX: true
290-
CHROME_DIR: /tmp/web_chromium/
291-
CHROME_EXECUTABLE: $CHROME_DIR/chrome-linux/chrome
292-
install_script:
293-
# Install a pinned version of Chromium and its corresponding ChromeDriver.
294-
# Setting CHROME_EXECUTABLE above causes this version to be used for tests.
295-
- ./script/install_chromium.sh "$CHROME_DIR"
299+
<< : *INSTALL_CHROME_LINUX
296300
chromedriver_background_script:
297-
- cd "$CHROME_DIR"
298-
- ./chromedriver/chromedriver --port=4444
301+
- $CHROMEDRIVER_EXECUTABLE --port=4444
299302
build_script:
300303
- ./script/tool_runner.sh build-examples --web
301304
drive_script:
@@ -334,62 +337,3 @@ task:
334337
- ./script/tool_runner.sh native-test --macos
335338
drive_script:
336339
- ./script/tool_runner.sh drive-examples --macos --exclude=script/configs/exclude_integration_macos.yaml
337-
338-
# Intel macOS tasks.
339-
task:
340-
<< : *MACOS_INTEL_TEMPLATE
341-
<< : *FLUTTER_UPGRADE_TEMPLATE
342-
matrix:
343-
### iOS+macOS tasks ***
344-
# TODO(stuartmorgan): Move this to ARM once google_maps_flutter has ARM
345-
# support. `pod lint` makes a synthetic target that doesn't respect the
346-
# pod's arch exclusions, so fails to build.
347-
- name: darwin-lint_podspecs
348-
script:
349-
- ./script/tool_runner.sh podspecs
350-
### iOS tasks ###
351-
# TODO(stuartmorgan): Swap this and ios-build_all_plugins once simulator
352-
# tests are reliable on the ARM infrastructure. See discussion at
353-
# https://github.com/flutter/plugins/pull/5693#issuecomment-1126011089
354-
- name: ios-platform_tests
355-
# Don't run full platform tests on both channels in pre-submit.
356-
skip: $CIRRUS_PR != '' && $CHANNEL == 'stable'
357-
env:
358-
PATH: $PATH:/usr/local/bin
359-
matrix:
360-
PACKAGE_SHARDING: "--shardIndex 0 --shardCount 4"
361-
PACKAGE_SHARDING: "--shardIndex 1 --shardCount 4"
362-
PACKAGE_SHARDING: "--shardIndex 2 --shardCount 4"
363-
PACKAGE_SHARDING: "--shardIndex 3 --shardCount 4"
364-
matrix:
365-
CHANNEL: "master"
366-
CHANNEL: "stable"
367-
SIMCTL_CHILD_MAPS_API_KEY: ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550]
368-
create_simulator_script:
369-
- xcrun simctl list
370-
- xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-11 com.apple.CoreSimulator.SimRuntime.iOS-15-0 | xargs xcrun simctl boot
371-
build_script:
372-
- ./script/tool_runner.sh build-examples --ios
373-
xcode_analyze_script:
374-
- ./script/tool_runner.sh xcode-analyze --ios
375-
xcode_analyze_deprecation_script:
376-
# Ensure we don't accidentally introduce deprecated code.
377-
- ./script/tool_runner.sh xcode-analyze --ios --ios-min-version=13.0
378-
native_test_script:
379-
- ./script/tool_runner.sh native-test --ios --ios-destination "platform=iOS Simulator,name=iPhone 11,OS=latest"
380-
drive_script:
381-
# `drive-examples` contains integration tests, which changes the UI of the application.
382-
# This UI change sometimes affects `xctest`.
383-
# So we run `drive-examples` after `native-test`; changing the order will result ci failure.
384-
- ./script/tool_runner.sh drive-examples --ios --exclude=script/configs/exclude_integration_ios.yaml
385-
### macOS desktop tasks ###
386-
# macos-platform_tests builds all the plugins on M1, so this build is run
387-
# on Intel to give us build coverage of both host types.
388-
- name: macos-build_all_plugins
389-
env:
390-
BUILD_ALL_ARGS: "macos"
391-
matrix:
392-
CHANNEL: "master"
393-
CHANNEL: "stable"
394-
setup_script:
395-
<< : *BUILD_ALL_PLUGINS_APP_TEMPLATE

.github/workflows/scorecards-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
persist-credentials: false
2828

2929
- name: "Run analysis"
30-
uses: ossf/scorecard-action@e363bfca00e752f91de7b7d2a77340e2e523cb18
30+
uses: ossf/scorecard-action@99c53751e09b9529366343771cc321ec74e9bd3d
3131
with:
3232
results_file: results.sarif
3333
results_format: sarif

analysis_options.yaml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ linter:
7575
- avoid_field_initializers_in_const_classes
7676
# - avoid_final_parameters # incompatible with prefer_final_parameters
7777
- avoid_function_literals_in_foreach_calls
78-
# - avoid_implementing_value_types # LOCAL CHANGE - Needs to be enabled and violations fixed.
78+
- avoid_implementing_value_types
7979
- avoid_init_to_null
8080
- avoid_js_rounded_ints
8181
# - avoid_multiple_declarations_per_line # seems to be a stylistic choice we don't subscribe to
@@ -87,7 +87,7 @@ linter:
8787
- avoid_relative_lib_imports
8888
- avoid_renaming_method_parameters
8989
- avoid_return_types_on_setters
90-
# - avoid_returning_null # still violated by some pre-nnbd code that we haven't yet migrated
90+
- avoid_returning_null
9191
- avoid_returning_null_for_future
9292
- avoid_returning_null_for_void
9393
# - avoid_returning_this # there are enough valid reasons to return `this` that this lint ends up with too many false positives
@@ -109,15 +109,17 @@ linter:
109109
# - cascade_invocations # doesn't match the typical style of this repo
110110
- cast_nullable_to_non_nullable
111111
# - close_sinks # not reliable enough
112+
# - combinators_ordering # DIFFERENT FROM FLUTTER/FLUTTER: This isn't available on stable yet.
112113
# - comment_references # blocked on https://github.com/dart-lang/linter/issues/1142
113-
# - conditional_uri_does_not_exist # not yet tested
114+
- conditional_uri_does_not_exist
114115
# - constant_identifier_names # needs an opt-out https://github.com/dart-lang/linter/issues/204
115116
- control_flow_in_finally
116-
# - curly_braces_in_flow_control_structures # not required by flutter style
117+
- curly_braces_in_flow_control_structures
117118
- depend_on_referenced_packages
118119
- deprecated_consistency
119120
# - diagnostic_describe_all_properties # enabled only at the framework level (packages/flutter/lib)
120121
- directives_ordering
122+
# - discarded_futures # not yet tested
121123
# - do_not_use_environment # there are appropriate times to use the environment, especially in our tests and build logic
122124
- empty_catches
123125
- empty_constructor_bodies
@@ -128,7 +130,6 @@ linter:
128130
- flutter_style_todos
129131
- hash_and_equals
130132
- implementation_imports
131-
# - invariant_booleans # too many false positives: https://github.com/dart-lang/linter/issues/811
132133
- iterable_contains_unrelated_type
133134
# - join_return_with_assignment # not required by flutter style
134135
- leading_newlines_in_multiline_strings
@@ -203,20 +204,20 @@ linter:
203204
- recursive_getters
204205
# - require_trailing_commas # blocked on https://github.com/dart-lang/sdk/issues/47441
205206
- secure_pubspec_urls
206-
# - sized_box_for_whitespace # LOCAL CHANGE - Needs to be enabled and violations fixed.
207+
- sized_box_for_whitespace
207208
# - sized_box_shrink_expand # not yet tested
208209
- slash_for_doc_comments
209210
- sort_child_properties_last
210211
- sort_constructors_first
211-
# - sort_pub_dependencies # prevents separating pinned transitive dependencies
212+
- sort_pub_dependencies # DIFFERENT FROM FLUTTER/FLUTTER: Flutter's use case for not sorting does not apply to this repository.
212213
- sort_unnamed_constructors_first
213214
- test_types_in_equals
214215
- throw_in_finally
215216
- tighten_type_of_initializing_formals
216217
# - type_annotate_public_apis # subset of always_specify_types
217218
- type_init_formals
218219
# - unawaited_futures # too many false positives, especially with the way AnimationController works
219-
# - unnecessary_await_in_return # LOCAL CHANGE - Needs to be enabled and violations fixed.
220+
- unnecessary_await_in_return
220221
- unnecessary_brace_in_string_interps
221222
- unnecessary_const
222223
- unnecessary_constructor_name
@@ -226,6 +227,7 @@ linter:
226227
- unnecessary_late
227228
- unnecessary_new
228229
- unnecessary_null_aware_assignments
230+
- unnecessary_null_aware_operator_on_extension_on_nullable
229231
- unnecessary_null_checks
230232
- unnecessary_null_in_if_null_operators
231233
- unnecessary_nullable_for_final_variable_declarations
@@ -236,6 +238,7 @@ linter:
236238
- unnecessary_string_escapes
237239
- unnecessary_string_interpolations
238240
- unnecessary_this
241+
- unnecessary_to_list_in_spreads
239242
- unrelated_type_equality_checks
240243
- unsafe_html
241244
# - use_build_context_synchronously # LOCAL CHANGE - Needs to be enabled and violations fixed.
@@ -263,6 +266,3 @@ linter:
263266
# separately when moving to a shared file.
264267
- no_runtimeType_toString # use objectRuntimeType from package:foundation
265268
- public_member_api_docs # see https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#documentation-dartdocs-javadocs-etc
266-
# Flutter has a specific use case for dependencies that are intentionally
267-
# not sorted, which doesn't apply to this repo.
268-
- sort_pub_dependencies

packages/camera/camera_android_camerax/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ android {
5656

5757
dependencies {
5858
// CameraX core library using the camera2 implementation must use same version number.
59-
def camerax_version = "1.2.0-rc01"
59+
def camerax_version = "1.3.0-alpha01"
6060
implementation "androidx.camera:camera-core:${camerax_version}"
6161
implementation "androidx.camera:camera-camera2:${camerax_version}"
6262
implementation "androidx.camera:camera-lifecycle:${camerax_version}"

0 commit comments

Comments
 (0)