Skip to content

Commit

Permalink
Merge branch 'google/master' into merge_camera_plugin
Browse files Browse the repository at this point in the history
* google/master: (340 commits)
  [camera]remove "selfRef" for SavePhotoDelegate and ensure thread safety (flutter#4780)
  Roll Flutter from 919d205 to adafd66 (5 revisions) (flutter#4876)
  [google_sign_in] Update platform interface analysis options (flutter#4872)
  Roll Flutter from b623279 to 919d205 (2 revisions) (flutter#4871)
  Roll Flutter from 14a2b13 to b623279 (5 revisions) (flutter#4870)
  [image_picker] Update platform interface analysis options (flutter#4837)
  [ci] Re-enable stable webview Android tests (flutter#4867)
  Roll Flutter from 286c975 to 14a2b13 (1 revision) (flutter#4865)
  [local_auth] support localizedFallbackTitle in IOSAuthMessages (flutter#3806)
  [image_picker] Update app-facing and web analysis options (flutter#4838)
  Roll Flutter from 8386344 to 286c975 (4 revisions) (flutter#4864)
  Roll Flutter from e9f83cf to 8386344 (6 revisions) (flutter#4862)
  [camera] Switch web package to new analysis options (flutter#4834)
  [flutter_plugin_tool] Fix iOS/macOS naming (flutter#4861)
  [webview_flutter] Fix debuggingEnabled on Android (flutter#4859)
  Roll Flutter from ca2a751 to e9f83cf (10 revisions) (flutter#4857)
  fix license (flutter#4858)
  [video_player] add allowBackgroundPlayback option platform interface changes (flutter#4807)
  [video_player] Updated Pigeon version (flutter#4726)
  Roll Flutter from 381cb28 to ca2a751 (5 revisions) (flutter#4850)
  ...

# Conflicts:
#	packages/camera/camera/CHANGELOG.md
#	packages/camera/camera/android/build.gradle
#	packages/camera/camera/android/src/main/java/io/flutter/plugins/camera/Camera.java
#	packages/camera/camera/android/src/main/java/io/flutter/plugins/camera/MethodCallHandlerImpl.java
#	packages/camera/camera/ios/Classes/CameraPlugin.m
#	packages/camera/camera/ios/camera.podspec
#	packages/camera/camera/lib/camera.dart
#	packages/camera/camera/lib/src/camera_controller.dart
#	packages/camera/camera/pubspec.yaml
  • Loading branch information
debojyoti committed Feb 17, 2022
2 parents 4dbe61f + 0b969a4 commit 7ff317f
Show file tree
Hide file tree
Showing 2,405 changed files with 89,373 additions and 47,292 deletions.
12 changes: 10 additions & 2 deletions .ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
# for every commit.
#
# More information at:
# * https://github.com/flutter/cocoon/blob/master/CI_YAML.md
# * https://github.com/flutter/cocoon/blob/main/CI_YAML.md
enabled_branches:
- master
- main

platform_properties:
linux:
Expand Down Expand Up @@ -41,6 +41,8 @@ targets:
properties:
add_recipes_cq: "true"
target_file: windows_build_and_platform_tests.yaml
channel: master
version_file: flutter_master.version
dependencies: >
[
{"dependency": "vs_build"}
Expand All @@ -66,6 +68,8 @@ targets:
properties:
add_recipes_cq: "true"
target_file: build_all_plugins.yaml
channel: master
version_file: flutter_master.version
dependencies: >
[
{"dependency": "vs_build"}
Expand All @@ -91,6 +95,8 @@ targets:
properties:
add_recipes_cq: "true"
target_file: uwp_build_and_platform_tests.yaml
channel: master
version_file: flutter_master.version
dependencies: >
[
{"dependency": "vs_build"}
Expand All @@ -103,6 +109,8 @@ targets:
properties:
add_recipes_cq: "true"
target_file: plugin_tools_tests.yaml
channel: master
version_file: flutter_master.version
scheduler: luci

- name: Linux ci_yaml plugins roller
Expand Down
9 changes: 3 additions & 6 deletions .ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
# The Flutter version is not important here, since the CI scripts update Flutter
# before running. What matters is that the base image is pinned to minimize
# unintended changes when modifying this file.
FROM cirrusci/flutter:2.2.2
FROM cirrusci/flutter:2.8.0

RUN apt-get update -y

# Required by Roboeletric and the Android SDK.
RUN apt-get install -y openjdk-8-jdk
ENV JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64

RUN apt-get install -y --no-install-recommends gnupg

# Add repo for gcloud sdk and install it
Expand Down Expand Up @@ -45,6 +41,7 @@ RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo ap
RUN echo 'deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main' | sudo tee /etc/apt/sources.list.d/google-chrome.list
RUN apt-get update && apt-get install -y --no-install-recommends google-chrome-stable

# Make Chrome the default so http: has a handler for url_launcher tests.
# Make Chrome the default so http: and file: has a handler for url_launcher tests.
RUN apt-get install -y xdg-utils
RUN xdg-settings set default-web-browser google-chrome.desktop
RUN xdg-mime default google-chrome.desktop inode/directory
1 change: 1 addition & 0 deletions .ci/flutter_master.version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
adafd66d9cc7796214404c8117395e207bf23d01
33 changes: 0 additions & 33 deletions .ci/java8.Dockerfile

This file was deleted.

2 changes: 1 addition & 1 deletion .ci/scripts/build_examples_uwp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
# found in the LICENSE file.

dart ./script/tool/bin/flutter_plugin_tools.dart build-examples --winuwp \
--packages-for-branch
--packages-for-branch --log-timing
2 changes: 1 addition & 1 deletion .ci/scripts/build_examples_win32.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
# found in the LICENSE file.

dart ./script/tool/bin/flutter_plugin_tools.dart build-examples --windows \
--packages-for-branch
--packages-for-branch --log-timing
2 changes: 1 addition & 1 deletion .ci/scripts/drive_examples_win32.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
# found in the LICENSE file.

dart ./script/tool/bin/flutter_plugin_tools.dart drive-examples --windows \
--packages-for-branch
--exclude=script/configs/exclude_integration_win32.yaml --packages-for-branch --log-timing
2 changes: 1 addition & 1 deletion .ci/scripts/native_test_win32.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
# found in the LICENSE file.

dart ./script/tool/bin/flutter_plugin_tools.dart native-test --windows \
--no-integration --packages-for-branch
--no-integration --packages-for-branch --log-timing
122 changes: 86 additions & 36 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
gcp_credentials: ENCRYPTED[!48cff44dd32e9cc412d4d381c7fe68d373ca04cf2639f8192d21cb1a9ab5e21129651423a1cf88f3fd7fe2125c1cabd9!]
gcp_credentials: ENCRYPTED[!cc769765170bebc37e0556e2da5915ca64ee37f4ec8c966ec147e2f59578b476c99e457eafce4e2f8b1a4e305f7096b8!]

# Don't run on release tags since it creates O(n^2) tasks where n is the
# number of plugins
Expand All @@ -9,21 +9,31 @@ env:

tool_setup_template: &TOOL_SETUP_TEMPLATE
tool_setup_script:
- git fetch origin master # To set FETCH_HEAD for "git merge-base" to work
- git fetch origin main # To set FETCH_HEAD for "git merge-base" to work
- cd script/tool
- dart pub get

flutter_upgrade_template: &FLUTTER_UPGRADE_TEMPLATE
upgrade_flutter_script:
# Master uses a pinned, auto-rolled version to prevent out-of-band CI
# failures due to changes in Flutter.
# TODO(stuartmorgan): Investigate an autoroller for stable as well.
- TARGET_TREEISH=$CHANNEL
- if [[ "$CHANNEL" == "master" ]]; then
- TARGET_TREEISH=$(< .ci/flutter_$CHANNEL.version)
- fi
# Ensure that the repository has all the branches.
- cd $FLUTTER_HOME
- git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
- git fetch origin
# Switch to the requested branch.
- git checkout $CHANNEL
# Reset to upstream branch, rather than using pull, since the base image
# can sometimes be in a state where it has diverged from upstream (!).
- git reset --hard @{u}
# Switch to the requested channel.
- git checkout $TARGET_TREEISH
# When using a branch rather than a hash, reset to the upstream branch
# rather than using pull, since the base image can sometimes be in a state
# where it has diverged from upstream (!).
- if [[ "$TARGET_TREEISH" == "$CHANNEL" ]]; then
- git reset --hard @{u}
- fi
# Run doctor to allow auditing of what version of Flutter the run is using.
- flutter doctor -v
<< : *TOOL_SETUP_TEMPLATE
Expand All @@ -47,7 +57,7 @@ macos_template: &MACOS_TEMPLATE
# PRs on macOS.
use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true'
osx_instance:
image: big-sur-xcode-12.5
image: big-sur-xcode-13

# Light-workload Linux tasks.
# These use default machines, with fewer CPUs, to reduce pressure on the
Expand All @@ -68,12 +78,35 @@ task:
- cd script/tool
- dart pub run test
- name: publishable
version_check_script: ./script/tool_runner.sh version-check
env:
# TODO (mvanbeusekom): Temporary override to "stable" because of failure on "master".
# Remove override once https://github.com/dart-lang/pub/issues/3152 is resolved.
CHANNEL: stable
CHANGE_DESC: "$TMPDIR/change-description.txt"
version_check_script:
# For pre-submit, pass the PR description to the script to allow for
# version check overrides.
# For post-submit, ignore platform version breaking version changes and
# missing version/CHANGELOG detection; the PR description isn't reliably
# part of the commit message, so using the same flags as for presubmit
# would likely result in false-positive post-submit failures.
- if [[ $CIRRUS_PR == "" ]]; then
- ./script/tool_runner.sh version-check --ignore-platform-interface-breaks
- else
- echo "$CIRRUS_CHANGE_MESSAGE" > "$CHANGE_DESC"
- ./script/tool_runner.sh version-check --check-for-missing-changes --change-description-file="$CHANGE_DESC"
- fi
publish_check_script: ./script/tool_runner.sh publish-check
- name: format
format_script: ./script/tool_runner.sh format --fail-on-change
pubspec_script: ./script/tool_runner.sh pubspec-check
license_script: dart $PLUGIN_TOOL license-check
always:
format_script: ./script/tool_runner.sh format --fail-on-change
pubspec_script: ./script/tool_runner.sh pubspec-check
license_script: dart $PLUGIN_TOOL license-check
- name: federated_safety
# This check is only meaningful for PRs, as it validates changes
# rather than state.
only_if: $CIRRUS_PR != ""
script: ./script/tool_runner.sh federation-safety-check
- name: dart_unit_tests
env:
matrix:
Expand All @@ -86,21 +119,25 @@ task:
matrix:
CHANNEL: "master"
CHANNEL: "stable"
tool_script:
analyze_tool_script:
- cd script/tool
- dart analyze --fatal-infos
script:
analyze_script:
# DO NOT change the custom-analysis argument here without changing the Dart repo.
# See the comment in script/configs/custom_analysis.yaml for details.
- ./script/tool_runner.sh analyze --custom-analysis=script/configs/custom_analysis.yaml
### Android tasks ###
- name: android-build_all_plugins
env:
BUILD_ALL_ARGS: "apk"
matrix:
CHANNEL: "master"
CHANNEL: "stable"
<< : *BUILD_ALL_PLUGINS_APP_TEMPLATE
pathified_analyze_script:
# Re-run analysis with path-based dependencies to ensure that publishing
# the changes won't break analysis of other packages in the respository
# that depend on it.
- ./script/tool_runner.sh make-deps-path-based --target-dependencies-with-non-breaking-updates
# This uses --run-on-dirty-packages rather than --packages-for-branch
# since only the packages changed by 'make-deps-path-based' need to be
# checked.
- dart $PLUGIN_TOOL analyze --run-on-dirty-packages --log-timing --custom-analysis=script/configs/custom_analysis.yaml
# Restore the tree to a clean state, to avoid accidental issues if
# other script steps are added to this task.
- git checkout .
### Web tasks ###
- name: web-build_all_plugins
env:
Expand Down Expand Up @@ -151,15 +188,16 @@ task:
- name: android-platform_tests
env:
matrix:
PLUGIN_SHARDING: "--shardIndex 0 --shardCount 4"
PLUGIN_SHARDING: "--shardIndex 1 --shardCount 4"
PLUGIN_SHARDING: "--shardIndex 2 --shardCount 4"
PLUGIN_SHARDING: "--shardIndex 3 --shardCount 4"
PLUGIN_SHARDING: "--shardIndex 0 --shardCount 5"
PLUGIN_SHARDING: "--shardIndex 1 --shardCount 5"
PLUGIN_SHARDING: "--shardIndex 2 --shardCount 5"
PLUGIN_SHARDING: "--shardIndex 3 --shardCount 5"
PLUGIN_SHARDING: "--shardIndex 4 --shardCount 5"
matrix:
CHANNEL: "master"
CHANNEL: "stable"
MAPS_API_KEY: ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550]
GCLOUD_FIREBASE_TESTLAB_KEY: ENCRYPTED[!c9446a7b11d5520c2ebce3c64ccc82fe6d146272cb06a4a4590e22c389f33153f951347a25422522df1a81fe2f085e9a!]
GCLOUD_FIREBASE_TESTLAB_KEY: ENCRYPTED[de02374f8d2d14d50792c6b521af2dfb86cbb522efed104f905002e4332546104d387d2bb8710956b729b4bd6533bba0]
build_script:
# Unsetting CIRRUS_CHANGE_MESSAGE and CIRRUS_COMMIT_MESSAGE as they
# might include non-ASCII characters which makes Gradle crash.
Expand Down Expand Up @@ -192,7 +230,7 @@ task:
- export CIRRUS_COMMIT_MESSAGE=""
- if [[ -n "$GCLOUD_FIREBASE_TESTLAB_KEY" ]]; then
- echo $GCLOUD_FIREBASE_TESTLAB_KEY > ${HOME}/gcloud-service-key.json
- ./script/tool_runner.sh firebase-test-lab --device model=flame,version=29 --device model=starqlteue,version=26 --exclude=script/configs/exclude_integration_android.yaml
- ./script/tool_runner.sh firebase-test-lab --device model=redfin,version=30 --device model=starqlteue,version=26 --exclude=script/configs/exclude_integration_android.yaml
- else
- echo "This user does not have permission to run Firebase Test Lab tests."
- fi
Expand All @@ -202,19 +240,31 @@ task:
path: "**/reports/lint-results-debug.xml"
type: text/xml
format: android-lint
- name: android-build_all_plugins
env:
BUILD_ALL_ARGS: "apk"
matrix:
CHANNEL: "master"
CHANNEL: "stable"
<< : *BUILD_ALL_PLUGINS_APP_TEMPLATE
### Web tasks ###
- name: web-platform_tests
env:
matrix:
PLUGIN_SHARDING: "--shardIndex 0 --shardCount 2"
PLUGIN_SHARDING: "--shardIndex 1 --shardCount 2"
matrix:
CHANNEL: "master"
CHANNEL: "stable"
CHROME_NO_SANDBOX: true
CHROME_DIR: /tmp/web_chromium/
CHROME_EXECUTABLE: $CHROME_DIR/chrome-linux/chrome
install_script:
- git clone https://github.com/flutter/web_installers.git
- cd web_installers/packages/web_drivers/
- dart pub get
# Install a pinned version of Chromium and its corresponding ChromeDriver.
# Setting CHROME_EXECUTABLE above causes this version to be used for tests.
- ./script/install_chromium.sh "$CHROME_DIR"
chromedriver_background_script:
- cd web_installers/packages/web_drivers/
- dart lib/web_driver_installer.dart chromedriver --install-only
- cd "$CHROME_DIR"
- ./chromedriver/chromedriver --port=4444
build_script:
- ./script/tool_runner.sh build-examples --web
Expand Down Expand Up @@ -252,13 +302,13 @@ task:
SIMCTL_CHILD_MAPS_API_KEY: ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550]
create_simulator_script:
- xcrun simctl list
- xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-11 com.apple.CoreSimulator.SimRuntime.iOS-14-5 | xargs xcrun simctl boot
- xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-11 com.apple.CoreSimulator.SimRuntime.iOS-15-0 | xargs xcrun simctl boot
build_script:
- ./script/tool_runner.sh build-examples --ios
xcode_analyze_script:
- ./script/tool_runner.sh xcode-analyze --ios
native_test_script:
- ./script/tool_runner.sh native-test --ios --ios-destination "platform=iOS Simulator,name=iPhone 11,OS=latest" --exclude=script/configs/exclude_native_ios.yaml
- ./script/tool_runner.sh native-test --ios --ios-destination "platform=iOS Simulator,name=iPhone 11,OS=latest"
drive_script:
# `drive-examples` contains integration tests, which changes the UI of the application.
# This UI change sometimes affects `xctest`.
Expand Down Expand Up @@ -286,6 +336,6 @@ task:
xcode_analyze_script:
- ./script/tool_runner.sh xcode-analyze --macos
native_test_script:
- ./script/tool_runner.sh native-test --macos --exclude=script/configs/exclude_native_macos.yaml
- ./script/tool_runner.sh native-test --macos
drive_script:
- ./script/tool_runner.sh drive-examples --macos
8 changes: 8 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
BasedOnStyle: Google
---
Language: Cpp
DerivePointerAlignment: false
PointerAlignment: Left
---
Language: ObjC
DerivePointerAlignment: false
PointerAlignment: Right
11 changes: 7 additions & 4 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@

- [ ] I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
- [ ] I read the [Tree Hygiene] wiki page, which explains my responsibilities.
- [ ] I read and followed the [relevant style guides] and ran [the auto-formatter]. (Note that unlike the flutter/flutter repo, the flutter/plugins repo does use `dart format`.)
- [ ] I read and followed the [relevant style guides] and ran [the auto-formatter]. (Unlike the flutter/flutter repo, the flutter/plugins repo does use `dart format`.)
- [ ] I signed the [CLA].
- [ ] The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. `[shared_preferences]`
- [ ] I listed at least one issue that this PR fixes in the description above.
- [ ] I [updated pubspec.yaml](https://github.com/flutter/flutter/wiki/Contributing-to-Plugins-and-Packages#version-and-changelog-updates) with an appropriate new version according to the [pub versioning philosophy].
- [ ] I updated CHANGELOG.md to add a description of the change.
- [ ] I updated `pubspec.yaml` with an appropriate new version according to the [pub versioning philosophy], or this PR is [exempt from version changes].
- [ ] I updated `CHANGELOG.md` to add a description of the change, [following repository CHANGELOG style].
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test exempt.
- [ ] I added new tests to check the change I am making, or this PR is [test-exempt].
- [ ] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on [Discord].
Expand All @@ -29,4 +29,7 @@ If you need help, consider asking for advice on the #hackers-new channel on [Dis
[breaking change policy]: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
[pub versioning philosophy]: https://dart.dev/tools/pub/versioning
[exempt from version changes]: https://github.com/flutter/flutter/wiki/Contributing-to-Plugins-and-Packages#version-and-changelog-updates
[following repository CHANGELOG style]: https://github.com/flutter/flutter/wiki/Contributing-to-Plugins-and-Packages#changelog-style
[the auto-formatter]: https://github.com/flutter/plugins/blob/master/script/tool/README.md#format-code
[test-exempt]: https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
Loading

0 comments on commit 7ff317f

Please sign in to comment.