Skip to content

Commit 4600705

Browse files
committed
Merge branch 'master' into gmain
* master: (114 commits) Windows nullsafety prep (flutter#3442) Add Labeler Github Action (flutter#3433) combine release messages and versions (flutter#3435) [plugin_platform_interface] Use Mockito nnbd (flutter#3437) [google_sign_in, url_launcher] Document unendorsement of web. (flutter#3436) [google_maps_flutter_web] Support for Holes in Polygons (flutter#3412) [script] Update build_all_plugins_app to exclude some plugins in `master`. (flutter#3432) [google_sign_in] Migrate to nnbd (flutter#3329) [local_auth] Allow device authentication (pin/pattern/passcode) (flutter#2489) [file_selector_platform_interface] Bump the cross_file version (flutter#3422) [camera] Fixes crash when taking a picture on iOS devices without flash (flutter#3411) fix to properly place polyline at initial camera position in example app (flutter#2941) [camera] Copy zoom settings from preview to final capture builder on Android (flutter#3413) [camera] Fixes crash with using inner camera on some Android devices. (flutter#3419) [camera] Fix initialization error in camera example on iOS (flutter#3406) [camera] Fix picture capture causing a crash on some Huawei devices. (flutter#3414) [file_selector_web] Add dummy ios directory. (flutter#3416) [google_maps_flutter] Adds support for holes in polygon overlays to the Google Maps plugin (flutter#1721) [camera] Implemented capture orientation locking. Fixed preview rotation issues. Fixed video and photo orientation upon save. (flutter#3390) [file_selector_web] Add initial implementation (flutter#3141) ...
2 parents 52dac7c + f302473 commit 4600705

File tree

591 files changed

+18486
-5227
lines changed

Some content is hidden

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

591 files changed

+18486
-5227
lines changed

.cirrus.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,16 @@ task:
3939
- flutter channel $CHANNEL
4040
- ./script/incremental_build.sh test
4141
- name: analyze
42+
env:
43+
matrix:
44+
CHANNEL: "master"
45+
CHANNEL: "stable"
4246
script: ./script/incremental_build.sh analyze
4347
- name: build_all_plugins_apk
48+
env:
49+
matrix:
50+
CHANNEL: "master"
51+
CHANNEL: "stable"
4452
script:
4553
# TODO(jackson): Allow web plugins once supported on stable
4654
# https://github.com/flutter/flutter/issues/42864
@@ -132,6 +140,7 @@ task:
132140
osx_instance:
133141
image: catalina-xcode-11.3.1-flutter
134142
upgrade_script:
143+
- sudo gem install cocoapods
135144
- flutter channel stable
136145
- flutter upgrade
137146
- flutter channel master
@@ -143,6 +152,10 @@ task:
143152
- xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-X com.apple.CoreSimulator.SimRuntime.iOS-13-3 | xargs xcrun simctl boot
144153
matrix:
145154
- name: build_all_plugins_ipa
155+
env:
156+
matrix:
157+
CHANNEL: "master"
158+
CHANNEL: "stable"
146159
script:
147160
# TODO(jackson): Allow web plugins once supported on stable
148161
# https://github.com/flutter/flutter/issues/42864
@@ -163,7 +176,7 @@ task:
163176
- name: build-ipas+drive-examples
164177
env:
165178
PATH: $PATH:/usr/local/bin
166-
PLUGINS_TO_SKIP_XCTESTS: "battery/battery,camera,connectivity/connectivity,device_info/device_info,espresso,google_maps_flutter/google_maps_flutter,google_sign_in/google_sign_in,image_picker/image_picker,in_app_purchase,integration_test,ios_platform_images,local_auth,package_info,path_provider/path_provider,quick_actions,sensors,shared_preferences/shared_preferences,url_launcher/url_launcher,video_player/video_player,webview_flutter,wifi_info_flutter/wifi_info_flutter"
179+
PLUGINS_TO_SKIP_XCTESTS: "battery/battery,camera/camera,connectivity/connectivity,device_info/device_info,espresso,google_maps_flutter/google_maps_flutter,google_sign_in/google_sign_in,in_app_purchase,integration_test,ios_platform_images,local_auth,package_info,path_provider/path_provider,quick_actions,sensors,shared_preferences/shared_preferences,url_launcher/url_launcher,video_player/video_player,webview_flutter,wifi_info_flutter/wifi_info_flutter"
167180
matrix:
168181
PLUGIN_SHARDING: "--shardIndex 0 --shardCount 4"
169182
PLUGIN_SHARDING: "--shardIndex 1 --shardCount 4"
@@ -190,6 +203,7 @@ task:
190203
setup_script:
191204
- flutter config --enable-macos-desktop
192205
upgrade_script:
206+
- sudo gem install cocoapods
193207
- flutter channel master
194208
- flutter upgrade
195209
- git fetch origin master

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 19 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,32 @@
1-
## Description
1+
*Replace this paragraph with a description of what this PR is changing or adding, and why. Consider including before/after screenshots.*
22

3-
*Replace this paragraph with a description of what this PR is doing. If you're modifying existing behavior, describe the existing behavior, how this PR is changing it, and what motivated the change.*
3+
*List which issues are fixed by this PR. You must list at least one issue.*
44

5-
## Related Issues
5+
*If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
66

7-
*Replace this paragraph with a list of issues related to this PR from the [issue database](https://github.com/flutter/flutter/issues). Indicate, which of these issues are resolved or fixed by this PR. Note that you'll have to prefix the issue numbers with flutter/flutter#.*
8-
9-
## Checklist
10-
11-
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (`[x]`). This will ensure a smooth and quick review process.
7+
## Pre-launch Checklist
128

9+
- [ ] The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. `[shared_preferences]`
1310
- [ ] I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
14-
- [ ] My PR includes unit or integration tests for *all* changed/updated/fixed behaviors (See [Contributor Guide]).
15-
- [ ] All existing and new tests are passing.
16-
- [ ] I updated/added relevant documentation (doc comments with `///`).
17-
- [ ] The analyzer (`flutter analyze`) does not report any problems on my PR.
18-
- [ ] I read and followed the [Flutter Style Guide].
19-
- [ ] The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. [shared_preferences]
11+
- [ ] I read the [Tree Hygiene] wiki page, which explains my responsibilities.
12+
- [ ] I read and followed the [Flutter Style Guide] and the [C++, Objective-C, Java style guides].
13+
- [ ] I listed at least one issue that this PR fixes in the description above.
14+
- [ ] I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test exempt.
2015
- [ ] I updated pubspec.yaml with an appropriate new version according to the [pub versioning philosophy].
2116
- [ ] I updated CHANGELOG.md to add a description of the change.
17+
- [ ] I updated/added relevant documentation (doc comments with `///`).
2218
- [ ] I signed the [CLA].
23-
- [ ] I am willing to follow-up on review comments in a timely manner.
24-
25-
## Breaking Change
26-
27-
Does your PR require plugin users to manually update their apps to accommodate your change?
19+
- [ ] All existing and new tests are passing.
2820

29-
- [ ] Yes, this is a breaking change (please indicate a breaking change in CHANGELOG.md and increment major revision).
30-
- [ ] No, this is *not* a breaking change.
21+
If you need help, consider asking for advice on the #hackers-new channel on [Discord].
3122

3223
<!-- Links -->
33-
[issue database]: https://github.com/flutter/flutter/issues
34-
[Contributor Guide]: https://github.com/flutter/plugins/blob/master/CONTRIBUTING.md
24+
[Contributor Guide]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
25+
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
3526
[Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
36-
[pub versioning philosophy]: https://www.dartlang.org/tools/pub/versioning
27+
[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/master/CONTRIBUTING.md#style
3728
[CLA]: https://cla.developers.google.com/
29+
[flutter/tests]: https://github.com/flutter/tests
30+
[breaking change policy]: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
31+
[Discord]: https://github.com/flutter/flutter/wiki/Chat
32+
[pub versioning philosophy]: https://dart.dev/tools/pub/versioning

.github/labeler.yml

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
'p: android_alarm_manager':
2+
- packages/android_alarm_manager/**/*
3+
4+
'p: android_intent':
5+
- packages/android_intent/**/*
6+
7+
'p: battery':
8+
- packages/battery/**/*
9+
10+
'p: camera':
11+
- packages/camera/**/*
12+
13+
'p: connectivity':
14+
- packages/connectivity/**/*
15+
16+
'p: cross_file':
17+
- packages/cross_file/**/*
18+
19+
'p: device_info':
20+
- packages/device_info/**/*
21+
22+
'p: e2e':
23+
- packages/e2e/**/*
24+
25+
'p: espresso':
26+
- packages/espresso/**/*
27+
28+
'p: file_selector':
29+
- packages/file_selector/**/*
30+
31+
'p: flutter_plugin_android_lifecycle':
32+
- packages/flutter_plugin_android_lifecycle/**/*
33+
34+
'p: google_maps_flutter':
35+
- packages/google_maps_flutter/**/*
36+
37+
'p: google_sign_in':
38+
- packages/google_sign_in/**/*
39+
40+
'p: image_picker':
41+
- packages/image_picker/**/*
42+
43+
'p: in_app_purchase':
44+
- packages/in_app_purchase/**/*
45+
46+
'p: integration_test':
47+
- packages/integration_test/**/*
48+
49+
'p: ios_platform_images':
50+
- packages/ios_platform_images/**/*
51+
52+
'p: local_auth':
53+
- packages/local_auth/**/*
54+
55+
'p: package_info':
56+
- packages/package_info/**/*
57+
58+
'p: path_provider':
59+
- packages/path_provider/**/*
60+
61+
'p: plugin_platform_interface':
62+
- packages/plugin_platform_interface/**/*
63+
64+
'p: quick_actions':
65+
- packages/quick_actions/**/*
66+
67+
'p: sensors':
68+
- packages/sensors/**/*
69+
70+
'p: share':
71+
- packages/share/**/*
72+
73+
'p: shared_preferences':
74+
- packages/shared_preferences/**/*
75+
76+
'p: url_launcher':
77+
- packages/url_launcher/**/*
78+
79+
'p: video_player':
80+
- packages/video_player/**/*
81+
82+
'p: webview_flutter':
83+
- packages/webview_flutter/**/*
84+
85+
'p: wifi_info_flutter':
86+
- packages/wifi_info_flutter/**/*
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# This workflow applies labels to pull requests based on the
2+
# paths that are modified in the pull request.
3+
#
4+
# Edit `.github/labeler.yml` to configure labels.
5+
#
6+
# For more information, see: https://github.com/actions/labeler
7+
8+
name: Pull Request Labeler
9+
10+
on:
11+
- pull_request_target
12+
13+
jobs:
14+
label:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/labeler@main
18+
with:
19+
repo-token: "${{ secrets.GITHUB_TOKEN }}"
20+
sync-labels: true

AUTHORS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,5 @@ Kazuki Yamaguchi <[email protected]>
5959
Eitan Schwartz <[email protected]>
6060
Chris Rutkowski <[email protected]>
6161
Juan Alvarez <[email protected]>
62+
Aleksandr Yurkovskiy <[email protected]>
63+
Anton Borries <[email protected]>

CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ packages/android_intent/** @mklim @matthew-carroll
99
packages/battery/** @amirh @matthew-carroll
1010
packages/camera/** @bparrishMines
1111
packages/connectivity/** @cyanglaz @matthew-carroll
12+
packages/cross_file/** @ditman @mvanbeusekom
1213
packages/device_info/** @matthew-carroll
1314
packages/espresso/** @collinjackson @adazh
1415
packages/file_selector/** @ditman

CONTRIBUTING.md

Lines changed: 46 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
[![Build Status](https://api.cirrus-ci.com/github/flutter/plugins.svg)](https://cirrus-ci.com/github/flutter/plugins/master)
55

6-
_See also: [Flutter's code of conduct](https://flutter.io/design-principles/#code-of-conduct)_
6+
_See also: [Flutter's code of conduct](https://github.com/flutter/flutter/blob/master/CODE_OF_CONDUCT.md)_
77

88
## Things you will need
99

@@ -40,6 +40,28 @@ USB and debugging enabled on that device.
4040
* `cd packages/battery/example`
4141
* `flutter run`
4242

43+
## Setting up XCUITests
44+
45+
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](https://pub.dev/packages/integration_test) if the tests are not focused on iOS system UI.
46+
47+
If XCUITests has always been set up for the plugin, a RunnerUITests folder under `<the_plugin>/example/ios` directory can be found.
48+
If XCUITests has not been set up for the plugin, follow these steps to set it up:
49+
50+
1. Open <path_to_plugin>/example/ios/Runner.xcworkspace using XCode.
51+
1. Create a new "UI Testing Bundle".
52+
1. In the target options window, populate details as following, then click on "Finish".
53+
* In the "product name" field, type in "RunnerUITests" (this is the test target name our CI looks for.).
54+
* In the "Team" field, select "None".
55+
* In the Organization Name field, type in "Flutter". This should usually be pre-populated.
56+
* In the organization identifer field, type in "com.google". This should usually be pre-populated.
57+
* In the Language field, select "Objective-C".
58+
* In the Project field, select the xcodeproj "Runner" (blue color).
59+
* In the Target to be Tested, select xcworkspace "Runner" (white color).
60+
1. A RunnerUITests folder should be created and you can start hacking in `RunnerUITests.m`.
61+
1. To enable the test on CI, the plugin needs to be removed from the "skip" list:
62+
* Open `./cirrus.yml` and find PLUGINS_TO_SKIP_XCTESTS.
63+
* Remove the plugin name from the list.
64+
4365
## Running the tests
4466

4567
### Integration tests
@@ -84,22 +106,41 @@ cd android
84106
./gradlew test
85107
```
86108

109+
### XCTests (iOS)
110+
111+
XCUnitTests are typically configured to run with cocoapods in this repo. To run all the XCUnitTests for a plugin:
112+
113+
```console
114+
cd ios
115+
pod lib lint --allow-warnings
116+
```
117+
118+
XCUITests aren't usually configured with cocoapods in this repo. They are configured in a xcode workspace target named RunnerUITests.
119+
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)
120+
121+
For convenience, a [flutter_plugin_tools](https://pub.dev/packages/flutter_plugin_tools) command `xctest` could also be used to run all the XCUITests in the repo:
122+
123+
```console
124+
pub global activate flutter_plugin_tools
125+
cd <path_to_plugins>/packages
126+
pub global run flutter_plugin_tools xctest --target RunnerUITests --skip <plugins_to_skip>
127+
```
128+
87129
## Contributing code
88130

89131
We gladly accept contributions via GitHub pull requests.
90132

91133
Please peruse our
92-
[style guide](https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo) and
93-
[design principles](https://flutter.io/design-principles/) before
94-
working on anything non-trivial. These guidelines are intended to
134+
[style guide](https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo)
135+
before working on anything non-trivial. These guidelines are intended to
95136
keep the code consistent and avoid common pitfalls.
96137

97138
To start working on a patch:
98139

99140
* `git fetch upstream`
100141
* `git checkout upstream/master -b <name_of_your_branch>`
101142
* Hack away.
102-
* Verify changes with [flutter_plugin_tools](https://pub.dartlang.org/packages/flutter_plugin_tools)
143+
* Verify changes with [flutter_plugin_tools](https://pub.dev/packages/flutter_plugin_tools)
103144
```
104145
pub global activate flutter_plugin_tools
105146
pub global run flutter_plugin_tools format --plugins plugin_name

analysis_options.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ analyzer:
44
# Ignore generated files
55
- '**/*.g.dart'
66
- 'lib/src/generated/*.dart'
7+
errors:
8+
always_require_non_null_named_parameters: false # not needed with nnbd
9+
unnecessary_null_comparison: false # Turned as long as nnbd mix-mode is supported.
710
linter:
811
rules:
912
- public_member_api_docs

packages/android_alarm_manager/CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
## 0.4.5+20
2+
3+
* Update the example app: remove the deprecated `RaisedButton` and `FlatButton` widgets.
4+
5+
## 0.4.5+19
6+
7+
* Fix outdated links across a number of markdown files ([#3276](https://github.com/flutter/plugins/pull/3276))
8+
9+
## 0.4.5+18
10+
11+
* Update Flutter SDK constraint.
12+
13+
## 0.4.5+17
14+
15+
* Update Dart SDK constraint in example.
16+
117
## 0.4.5+16
218

319
* Remove unnecessary workaround from test.

packages/android_alarm_manager/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# android_alarm_manager
22

3-
[![pub package](https://img.shields.io/pub/v/android_alarm_manager.svg)](https://pub.dartlang.org/packages/android_alarm_manager)
3+
[![pub package](https://img.shields.io/pub/v/android_alarm_manager.svg)](https://pub.dev/packages/android_alarm_manager)
44

55
A Flutter plugin for accessing the Android AlarmManager service, and running
66
Dart code in the background when alarms fire.
@@ -36,7 +36,7 @@ Next, within the `<application></application>` tags, add:
3636
android:name="io.flutter.plugins.androidalarmmanager.RebootBroadcastReceiver"
3737
android:enabled="false">
3838
<intent-filter>
39-
<action android:name="android.intent.action.BOOT_COMPLETED"></action>
39+
<action android:name="android.intent.action.BOOT_COMPLETED"/>
4040
</intent-filter>
4141
</receiver>
4242

@@ -121,6 +121,6 @@ register plugins. This can be resolved by running `flutter upgrade` to upgrade
121121
to the latest Flutter version.**
122122

123123
For help getting started with Flutter, view our online
124-
[documentation](http://flutter.io/).
124+
[documentation](https://flutter.dev/).
125125

126-
For help on editing plugin code, view the [documentation](https://flutter.io/platform-plugins/#edit-code).
126+
For help on editing plugin code, view the [documentation](https://flutter.dev/docs/development/packages-and-plugins/developing-packages#plugin).

packages/android_alarm_manager/example/android/app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
android:name="io.flutter.plugins.androidalarmmanager.RebootBroadcastReceiver"
4242
android:enabled="false">
4343
<intent-filter>
44-
<action android:name="android.intent.action.BOOT_COMPLETED"></action>
44+
<action android:name="android.intent.action.BOOT_COMPLETED"/>
4545
</intent-filter>
4646
</receiver>
4747
<meta-data

packages/android_alarm_manager/example/lib/main.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ class _AlarmHomePageState extends State<_AlarmHomePage> {
131131
),
132132
],
133133
),
134-
RaisedButton(
134+
ElevatedButton(
135135
child: Text(
136136
'Schedule OneShot Alarm',
137137
),

packages/android_alarm_manager/example/pubspec.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,7 @@ dev_dependencies:
2121

2222
flutter:
2323
uses-material-design: true
24+
25+
environment:
26+
sdk: ">=2.1.0 <3.0.0"
27+
flutter: ">=1.12.13+hotfix.5 <2.0.0"

0 commit comments

Comments
 (0)