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

Commit 5be7968

Browse files
committed
Merge branch 'master' into image_picker_fix_alert
# Conflicts: # packages/image_picker/image_picker/CHANGELOG.md # packages/image_picker/image_picker/ios/Classes/FLTImagePickerPlugin.m
2 parents 6d7c1a4 + d4f708b commit 5be7968

File tree

237 files changed

+5713
-6890
lines changed

Some content is hidden

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

237 files changed

+5713
-6890
lines changed

.ci/dev/try_builders.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{
44
"name":"Windows Plugins",
55
"repo":"plugins",
6-
"enabled":false
6+
"enabled":true
77
}
88
]
99
}

.cirrus.yml

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,12 @@ task:
194194
<< : *MACOS_TEMPLATE
195195
<< : *FLUTTER_UPGRADE_TEMPLATE
196196
matrix:
197+
### iOS+macOS tasks ***
198+
- name: lint_darwin_plugins
199+
script:
200+
# TODO(jmagman): Lint macOS podspecs but skip any that fail library validation.
201+
- find . -name "*.podspec" | xargs grep -l "osx" | xargs rm
202+
- ./script/tool_runner.sh podspecs
197203
### iOS tasks ###
198204
- name: build_all_plugins_ipa
199205
env:
@@ -251,14 +257,3 @@ task:
251257
- ./script/tool_runner.sh build-examples --macos --no-ipa
252258
drive_script:
253259
- ./script/tool_runner.sh drive-examples --macos
254-
255-
task:
256-
# Don't use FLUTTER_UPGRADE_TEMPLATE, Flutter tooling not needed.
257-
<< : *MACOS_TEMPLATE
258-
<< : *TOOL_SETUP_TEMPLATE
259-
matrix:
260-
- name: lint_darwin_plugins
261-
script:
262-
# TODO(jmagman): Lint macOS podspecs but skip any that fail library validation.
263-
- find . -name "*.podspec" | xargs grep -l "osx" | xargs rm
264-
- ./script/tool_runner.sh podspecs

.github/post_merge_labeler.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
'needs-publishing':
2-
- packages/*/**
2+
- packages/**/pubspec.yaml

CONTRIBUTING.md

Lines changed: 50 additions & 205 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,23 @@
44

55
_See also: [Flutter's code of conduct](https://github.com/flutter/flutter/blob/master/CODE_OF_CONDUCT.md)_
66

7+
## Welcome
8+
9+
For an introduction to contributing to Flutter, see [our contributor
10+
guide][https://github.com/flutter/flutter/blob/master/CONTRIBUTING.md].
11+
12+
Additional resources specific to the plugins repository:
13+
- [Setting up the Plugins development
14+
environment](https://github.com/flutter/flutter/wiki/Setting-up-the-Plugins-development-environment),
15+
which covers the setup process for this repository.
16+
- [Plugins repository structure](https://github.com/flutter/flutter/wiki/Plugins-and-Packages-repository-structure),
17+
to get an overview of how this repository is laid out.
18+
- [Plugin tests](https://github.com/flutter/flutter/wiki/Plugin-Tests), which explains
19+
the different kinds of tests used for plugins, where to find them, and how to run them.
20+
As explained in the Flutter guide,
21+
[**PRs needs tests**](https://github.com/flutter/flutter/wiki/Tree-hygiene#tests), so
22+
this is critical to read before submitting a PR.
23+
724
## Important note
825

926
As of January 2021, we are no longer accepting non-critical PRs for plugins
@@ -23,220 +40,48 @@ for any of the following plugins, we encourage you to submit it
2340
- `share`
2441
- `wifi_info_flutter` (corresponds to `network_info_plus`)
2542

26-
## Things you will need
27-
28-
* Linux, Mac OS X, or Windows.
29-
* git (used for source version control).
30-
* An ssh client (used to authenticate with GitHub).
31-
32-
## Getting the code and configuring your environment
33-
34-
* Ensure all the dependencies described in the previous section are installed.
35-
* Fork `https://github.com/flutter/plugins` into your own GitHub account. If
36-
you already have a fork, and are now installing a development environment on
37-
a new machine, make sure you've updated your fork so that you don't use stale
38-
configuration options from long ago.
39-
* If you haven't configured your machine with an SSH key that's known to github, then
40-
follow [GitHub's directions](https://help.github.com/articles/generating-ssh-keys/)
41-
to generate an SSH key.
42-
* `git clone git@github.com:<your_name_here>/plugins.git`
43-
* `cd plugins`
44-
* `git remote add upstream git@github.com:flutter/plugins.git` (So that you
45-
fetch from the master repository, not your clone, when running `git fetch`
46-
et al.)
47-
48-
49-
## Setting up tools
50-
51-
There are scripts for many common tasks (testing, formatting, etc.) that will likely be useful in preparing a PR.
52-
See [plugin_tools](./script/tool/README.md) for more details.
53-
54-
## Running the examples
55-
56-
To run an example with a prebuilt binary from the cloud, switch to that
57-
example's directory, run `pub get` to make sure its dependencies have been
58-
downloaded, and use `flutter run`. Make sure you have a device connected over
59-
USB and debugging enabled on that device.
60-
61-
* `cd packages/battery/example`
62-
* `flutter run`
63-
64-
## Setting up XCUITests
65-
66-
Sometimes, XCUITests are useful when integration testing a plugin that has native UI on iOS (e.g image_picker, in_app_purchase, camera, share, local_auth etc). Most of the time, XCUITests are not necessary, consider using `integration_test` if the tests are not focused on iOS system UI.
67-
68-
If XCUITests has always been set up for the plugin, a RunnerUITests folder under `<the_plugin>/example/ios` directory can be found.
69-
If XCUITests has not been set up for the plugin, follow these steps to set it up:
70-
71-
1. Open <path_to_plugin>/example/ios/Runner.xcworkspace using XCode.
72-
1. Create a new "UI Testing Bundle".
73-
1. In the target options window, populate details as following, then click on "Finish".
74-
* In the "product name" field, type in "RunnerUITests".
75-
* In the "Team" field, select "None".
76-
* In the Organization Name field, type in "Flutter". This should usually be pre-populated.
77-
* In the organization identifer field, type in "com.google". This should usually be pre-populated.
78-
* In the Language field, select "Objective-C".
79-
* In the Project field, select the xcodeproj "Runner" (blue color).
80-
* In the Target to be Tested, select xcworkspace "Runner" (white color).
81-
1. A RunnerUITests folder should be created and you can start hacking in `RunnerUITests.m`.
82-
1. To enable the test on CI, the plugin needs to be removed from the "skip" list:
83-
* Open `./cirrus.yml` and find PLUGINS_TO_SKIP_XCTESTS.
84-
* Remove the plugin name from the list.
85-
86-
## Running the tests
87-
88-
### Integration tests
89-
90-
To run the integration tests using Flutter driver:
91-
92-
```console
93-
cd example
94-
flutter drive --driver test_driver/integration_test.dart --target integration_test/<name_of_plugin_test>.dart
95-
```
96-
97-
To run integration tests as instrumentation tests on a local Android device:
98-
99-
```console
100-
cd example
101-
flutter build apk
102-
cd android && ./gradlew -Ptarget=$(pwd)/../test_driver/<name_of_plugin>_test.dart app:connectedAndroidTest
103-
```
104-
105-
These tests may also be in folders just named "test," or have filenames ending
106-
with "e2e".
107-
108-
### Dart unit tests
109-
110-
To run the unit tests:
111-
112-
```console
113-
flutter test test/<name_of_plugin>_test.dart
114-
```
115-
116-
### Java unit tests
117-
118-
These can be ran through Android Studio once the example app is opened as an
119-
Android project.
120-
121-
Without Android Studio, they can be ran through the terminal.
122-
123-
```console
124-
cd example
125-
flutter build apk
126-
cd android
127-
./gradlew test
128-
```
129-
130-
### XCTests (iOS)
131-
132-
XCUnitTests are typically configured to run with cocoapods in this repo. To run all the XCUnitTests for a plugin:
133-
134-
```console
135-
cd ios
136-
pod lib lint --allow-warnings
137-
```
138-
139-
XCUITests aren't usually configured with cocoapods in this repo. They are configured in a xcode workspace target named RunnerUITests.
140-
To run all the XCUITests in a plugin, follow the steps in a regular iOS development workflow [here](https://developer.apple.com/library/archive/documentation/DeveloperTools/Conceptual/testing_with_xcode/chapters/05-running_tests.html)
141-
142-
For convenience, a [plugin_tools](./script/tool/README.md) command [xctest](./script/tool/README.md#run-xctests) could also be used to run all the XCUITests in the repo.
143-
144-
## Contributing code
145-
146-
We gladly accept contributions via GitHub pull requests.
147-
148-
Please peruse our
149-
[style guide](https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo)
150-
before working on anything non-trivial. These guidelines are intended to
151-
keep the code consistent and avoid common pitfalls.
152-
153-
To start working on a patch:
154-
155-
* `git fetch upstream`
156-
* `git checkout upstream/master -b <name_of_your_branch>`
157-
* Hack away.
158-
* Verify changes with [plugin_tools](./script/tool/README.md).
159-
```sh
160-
cd script/tool && pub get && cd ../../
161-
dart ./script/tool/lib/src/main.dart format --plugins plugin_name
162-
dart ./script/tool/lib/src/main.dart analyze --plugins plugin_name
163-
dart ./script/tool/lib/src/main.dart test --plugins plugin_name
164-
```
165-
* `git commit -a -m "<your informative commit message>"`
166-
* `git push origin <name_of_your_branch>`
167-
168-
To send us a pull request:
169-
170-
* `git pull-request` (if you are using [Hub](http://github.com/github/hub/)) or
171-
go to `https://github.com/flutter/plugins` and click the
172-
"Compare & pull request" button
173-
174-
Please make sure all your checkins have detailed commit messages explaining the patch.
175-
176-
Plugins tests are run automatically on contributions using Cirrus CI. However, due to
177-
cost constraints, pull requests from non-committers may not run all the tests
178-
automatically.
179-
180-
Once you've gotten an LGTM from a project maintainer and once your PR has received
181-
the green light from all our automated testing, wait for one of the package maintainers
182-
to merge the pull request and `pub submit` any affected packages.
183-
184-
You must complete the
185-
[Contributor License Agreement](https://cla.developers.google.com/clas).
186-
You can do this online, and it only takes a minute.
187-
If you've never submitted code for that plugin before, you may also add your (or
188-
your organization's) name and contact info to the AUTHORS file for the plugin.
189-
You may also add it to the AUTHORS file for [the repository](AUTHORS).
190-
43+
## Other notes
44+
45+
### Style
46+
47+
Flutter plugins follow Google style—or Flutter style for Dart—for the languages they
48+
use, and use auto-formatters:
49+
- [Dart](https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo) formatted
50+
with `dart format`
51+
- [C++](https://google.github.io/styleguide/cppguide.html) formatted with `clang-format`
52+
- **Note**: The Linux plugins generally follow idiomatic GObject-based C
53+
style. See [the engine style
54+
notes](https://github.com/flutter/engine/blob/master/CONTRIBUTING.md#style)
55+
for more details, and exceptions.
56+
- [Java](https://google.github.io/styleguide/javaguide.html) formatted with
57+
`google-java-format`
58+
- [Objective-C](https://google.github.io/styleguide/objcguide.html) formatted with
59+
`clang-format`
60+
19161
### The review process
19262

193-
Reviewing PRs often requires a non trivial amount of time. We prioritize issues, not PRs, so that we use our maintainers' time in the most impactful way. Issues pertaining to this repository are managed in the [flutter/flutter issue tracker and are labeled with "plugin"](https://github.com/flutter/flutter/issues?q=is%3Aopen+is%3Aissue+label%3Aplugin+sort%3Areactions-%2B1-desc). Non trivial PRs should have an associated issue that will be used for prioritization. See the [prioritization section](https://github.com/flutter/flutter/wiki/Issue-hygiene#prioritization) in the Flutter wiki to understand how issues are prioritized.
63+
Reviewing PRs often requires a non-trivial amount of time. We prioritize issues, not PRs, so that we use our maintainers' time in the most impactful way. Issues pertaining to this repository are managed in the [flutter/flutter issue tracker and are labeled with "plugin"](https://github.com/flutter/flutter/issues?q=is%3Aopen+is%3Aissue+label%3Aplugin+sort%3Areactions-%2B1-desc). Non-trivial PRs should have an associated issue that will be used for prioritization. See the [prioritization section](https://github.com/flutter/flutter/wiki/Issue-hygiene#prioritization) in the Flutter wiki to understand how issues are prioritized.
19464

19565
Newly opened PRs first go through initial triage which results in one of:
19666
* **Merging the PR** - if the PR can be quickly reviewed and looks good.
197-
* **Closing the PR** - if the PR maintainer decides that the PR should not be merged.
198-
* **Moving the PR to the backlog** - if the review requires non trivial effort and the issue isn't a priority; in this case the maintainer will:
199-
* Make sure that the PR has an associated issue labeled with "plugin".
67+
* **Requesting minor changes** - if the PR can be quickly reviewed, but needs changes.
68+
* **Moving the PR to the backlog** - if the review requires non-trivial effort and the issue isn't currently a priority; in this case the maintainer will:
20069
* Add the "backlog" label to the issue.
20170
* Leave a comment on the PR explaining that the review is not trivial and that the issue will be looked at according to priority order.
202-
* **Starting a non trivial review** - if the review requires non trivial effort and the issue is a priority; in this case the maintainer will:
71+
* **Starting a non-trivial review** - if the review requires non-trivial effort and the issue is a priority; in this case the maintainer will:
20372
* Add the "in review" label to the issue.
20473
* Self assign the PR.
74+
* **Closing the PR** - if the PR maintainer decides that the PR should not be merged.
20575

206-
### The release process
207-
208-
We push releases manually. Generally every merged PR upgrades at least one
209-
plugin's `pubspec.yaml`, so also needs to be published as a package release. The
210-
Flutter team member most involved with the PR should be the person responsible
211-
for publishing the package release. In cases where the PR is authored by a
212-
Flutter maintainer, the publisher should probably be the author. In other cases
213-
where the PR is from a contributor, it's up to the reviewing Flutter team member
214-
to publish the release instead.
215-
216-
Some things to keep in mind before publishing the release:
217-
218-
- Has CI ran on the master commit and gone green? Even if CI shows as green on
219-
the PR it's still possible for it to fail on merge, for multiple reasons.
220-
There may have been some bug in the merge that introduced new failures. CI
221-
runs on PRs as it's configured on their branch state, and not on tip of tree.
222-
CI on PRs also only runs tests for packages that it detects have been directly
223-
changed, vs running on every single package on master.
224-
- [Publishing is
225-
forever.](https://dart.dev/tools/pub/publishing#publishing-is-forever)
226-
Hopefully any bugs or breaking in changes in this PR have already been caught
227-
in PR review, but now's a second chance to revert before anything goes live.
228-
- "Don't deploy on a Friday." Consider carefully whether or not it's worth
229-
immediately publishing an update before a stretch of time where you're going
230-
to be unavailable. There may be bugs with the release or questions about it
231-
from people that immediately adopt it, and uncovering and resolving those
232-
support issues will take more time if you're unavailable.
233-
234-
To release a package, a [publish-plugin](./script/tool/README.md#publish-and-tag-release) tool script should be used. This command publishes the new version to pub.dev, and tags the commit in the format of `<package_name>-v<package_version>` then pushes it to upstream.
76+
Please be aware that there is currently a significant backlog, so reviews for plugin PRs will
77+
in most cases take significantly longer to begin than the two-week timeframe given in the
78+
main Flutter PR guide. An effort is underway to work through the backlog, but it will
79+
take time. If you are interested in hepling out (e.g., by doing initial reviews looking
80+
for obvious problems like missing or failing tests), please reach out
81+
[on Discord](https://github.com/flutter/flutter/wiki/Chat) in `#hackers-ecosystem`.
23582

236-
Alternatively, one can release a package in the below 2-step process.
83+
### Releasing
23784

238-
1. Push the package update to [pub.dev](https://pub.dev) using `pub publish`.
239-
2. Tag the commit with git in the format of `<package_name>-v<package_version>`,
240-
and then push the tag to the `flutter/plugins` master branch. This can be
241-
done manually with `git tag $tagname && git push upstream $tagname` while
242-
checked out on the commit that updated `version` in `pubspec.yaml`.
85+
If you are a team member landing a PR, or just want to know what the release
86+
process is for plugin changes, see [the release
87+
documentation](https://github.com/flutter/flutter/wiki/Releasing-a-Plugin-or-Package).

packages/camera/camera/test/camera_image_stream_test.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,13 @@
44

55
import 'package:camera/camera.dart';
66
import 'package:camera_platform_interface/camera_platform_interface.dart';
7-
import 'package:flutter/widgets.dart';
87
import 'package:flutter_test/flutter_test.dart';
98

109
import 'camera_test.dart';
1110
import 'utils/method_channel_mock.dart';
1211

1312
void main() {
14-
WidgetsFlutterBinding.ensureInitialized();
13+
TestWidgetsFlutterBinding.ensureInitialized();
1514

1615
setUp(() {
1716
CameraPlatform.instance = MockCameraPlatform();

packages/google_maps_flutter/google_maps_flutter/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 2.0.4
2+
3+
* Unpin iOS GoogleMaps pod dependency version.
4+
15
## 2.0.3
26

37
* Fix incorrect typecast in TileOverlay example.

packages/google_maps_flutter/google_maps_flutter/ios/google_maps_flutter.podspec

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ Downloaded by pub (not CocoaPods).
1717
s.source_files = 'Classes/**/*'
1818
s.public_header_files = 'Classes/**/*.h'
1919
s.dependency 'Flutter'
20-
# TODO: Unpin this once the fix for b/163474612 or b/163359804 rolls (avoid v3.10!)
21-
s.dependency 'GoogleMaps', '< 3.10'
20+
s.dependency 'GoogleMaps'
2221
s.static_framework = true
2322
s.platform = :ios, '8.0'
2423
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'VALID_ARCHS[sdk=iphonesimulator*]' => 'x86_64' }

packages/google_maps_flutter/google_maps_flutter/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: google_maps_flutter
22
description: A Flutter plugin for integrating Google Maps in iOS and Android applications.
33
homepage: https://github.com/flutter/plugins/tree/master/packages/google_maps_flutter/google_maps_flutter
4-
version: 2.0.3
4+
version: 2.0.4
55

66
dependencies:
77
flutter:

packages/google_sign_in/google_sign_in/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
## NEXT
1+
## 5.0.3
22

33
* Fixed links in `README.md`.
4+
* Added documentation for usage on the web.
45

56
## 5.0.2
67

0 commit comments

Comments
 (0)