Skip to content

Commit

Permalink
Merge branch 'master' into gmain
Browse files Browse the repository at this point in the history
* 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)
  ...
  • Loading branch information
yasargil committed Jan 21, 2021
2 parents 52dac7c + f302473 commit 4600705
Show file tree
Hide file tree
Showing 591 changed files with 18,486 additions and 5,227 deletions.
16 changes: 15 additions & 1 deletion .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,16 @@ task:
- flutter channel $CHANNEL
- ./script/incremental_build.sh test
- name: analyze
env:
matrix:
CHANNEL: "master"
CHANNEL: "stable"
script: ./script/incremental_build.sh analyze
- name: build_all_plugins_apk
env:
matrix:
CHANNEL: "master"
CHANNEL: "stable"
script:
# TODO(jackson): Allow web plugins once supported on stable
# https://github.com/flutter/flutter/issues/42864
Expand Down Expand Up @@ -132,6 +140,7 @@ task:
osx_instance:
image: catalina-xcode-11.3.1-flutter
upgrade_script:
- sudo gem install cocoapods
- flutter channel stable
- flutter upgrade
- flutter channel master
Expand All @@ -143,6 +152,10 @@ task:
- xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-X com.apple.CoreSimulator.SimRuntime.iOS-13-3 | xargs xcrun simctl boot
matrix:
- name: build_all_plugins_ipa
env:
matrix:
CHANNEL: "master"
CHANNEL: "stable"
script:
# TODO(jackson): Allow web plugins once supported on stable
# https://github.com/flutter/flutter/issues/42864
Expand All @@ -163,7 +176,7 @@ task:
- name: build-ipas+drive-examples
env:
PATH: $PATH:/usr/local/bin
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"
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"
matrix:
PLUGIN_SHARDING: "--shardIndex 0 --shardCount 4"
PLUGIN_SHARDING: "--shardIndex 1 --shardCount 4"
Expand All @@ -190,6 +203,7 @@ task:
setup_script:
- flutter config --enable-macos-desktop
upgrade_script:
- sudo gem install cocoapods
- flutter channel master
- flutter upgrade
- git fetch origin master
Expand Down
43 changes: 19 additions & 24 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,32 @@
## Description
*Replace this paragraph with a description of what this PR is changing or adding, and why. Consider including before/after screenshots.*

*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.*
*List which issues are fixed by this PR. You must list at least one issue.*

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

*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#.*

## Checklist

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.
## Pre-launch Checklist

- [ ] The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. `[shared_preferences]`
- [ ] I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
- [ ] My PR includes unit or integration tests for *all* changed/updated/fixed behaviors (See [Contributor Guide]).
- [ ] All existing and new tests are passing.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [ ] The analyzer (`flutter analyze`) does not report any problems on my PR.
- [ ] I read and followed the [Flutter Style Guide].
- [ ] The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. [shared_preferences]
- [ ] I read the [Tree Hygiene] wiki page, which explains my responsibilities.
- [ ] I read and followed the [Flutter Style Guide] and the [C++, Objective-C, Java style guides].
- [ ] I listed at least one issue that this PR fixes in the description above.
- [ ] 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 updated pubspec.yaml with an appropriate new version according to the [pub versioning philosophy].
- [ ] I updated CHANGELOG.md to add a description of the change.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [ ] I signed the [CLA].
- [ ] I am willing to follow-up on review comments in a timely manner.

## Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?
- [ ] All existing and new tests are passing.

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

<!-- Links -->
[issue database]: https://github.com/flutter/flutter/issues
[Contributor Guide]: https://github.com/flutter/plugins/blob/master/CONTRIBUTING.md
[Contributor Guide]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[pub versioning philosophy]: https://www.dartlang.org/tools/pub/versioning
[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/master/CONTRIBUTING.md#style
[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
[pub versioning philosophy]: https://dart.dev/tools/pub/versioning
86 changes: 86 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
'p: android_alarm_manager':
- packages/android_alarm_manager/**/*

'p: android_intent':
- packages/android_intent/**/*

'p: battery':
- packages/battery/**/*

'p: camera':
- packages/camera/**/*

'p: connectivity':
- packages/connectivity/**/*

'p: cross_file':
- packages/cross_file/**/*

'p: device_info':
- packages/device_info/**/*

'p: e2e':
- packages/e2e/**/*

'p: espresso':
- packages/espresso/**/*

'p: file_selector':
- packages/file_selector/**/*

'p: flutter_plugin_android_lifecycle':
- packages/flutter_plugin_android_lifecycle/**/*

'p: google_maps_flutter':
- packages/google_maps_flutter/**/*

'p: google_sign_in':
- packages/google_sign_in/**/*

'p: image_picker':
- packages/image_picker/**/*

'p: in_app_purchase':
- packages/in_app_purchase/**/*

'p: integration_test':
- packages/integration_test/**/*

'p: ios_platform_images':
- packages/ios_platform_images/**/*

'p: local_auth':
- packages/local_auth/**/*

'p: package_info':
- packages/package_info/**/*

'p: path_provider':
- packages/path_provider/**/*

'p: plugin_platform_interface':
- packages/plugin_platform_interface/**/*

'p: quick_actions':
- packages/quick_actions/**/*

'p: sensors':
- packages/sensors/**/*

'p: share':
- packages/share/**/*

'p: shared_preferences':
- packages/shared_preferences/**/*

'p: url_launcher':
- packages/url_launcher/**/*

'p: video_player':
- packages/video_player/**/*

'p: webview_flutter':
- packages/webview_flutter/**/*

'p: wifi_info_flutter':
- packages/wifi_info_flutter/**/*
20 changes: 20 additions & 0 deletions .github/workflows/pull_request_label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# This workflow applies labels to pull requests based on the
# paths that are modified in the pull request.
#
# Edit `.github/labeler.yml` to configure labels.
#
# For more information, see: https://github.com/actions/labeler

name: Pull Request Labeler

on:
- pull_request_target

jobs:
label:
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@main
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
sync-labels: true
2 changes: 2 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,5 @@ Kazuki Yamaguchi <[email protected]>
Eitan Schwartz <[email protected]>
Chris Rutkowski <[email protected]>
Juan Alvarez <[email protected]>
Aleksandr Yurkovskiy <[email protected]>
Anton Borries <[email protected]>
1 change: 1 addition & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ packages/android_intent/** @mklim @matthew-carroll
packages/battery/** @amirh @matthew-carroll
packages/camera/** @bparrishMines
packages/connectivity/** @cyanglaz @matthew-carroll
packages/cross_file/** @ditman @mvanbeusekom
packages/device_info/** @matthew-carroll
packages/espresso/** @collinjackson @adazh
packages/file_selector/** @ditman
Expand Down
51 changes: 46 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

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

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

## Things you will need

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

## Setting up XCUITests

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.

If XCUITests has always been set up for the plugin, a RunnerUITests folder under `<the_plugin>/example/ios` directory can be found.
If XCUITests has not been set up for the plugin, follow these steps to set it up:

1. Open <path_to_plugin>/example/ios/Runner.xcworkspace using XCode.
1. Create a new "UI Testing Bundle".
1. In the target options window, populate details as following, then click on "Finish".
* In the "product name" field, type in "RunnerUITests" (this is the test target name our CI looks for.).
* In the "Team" field, select "None".
* In the Organization Name field, type in "Flutter". This should usually be pre-populated.
* In the organization identifer field, type in "com.google". This should usually be pre-populated.
* In the Language field, select "Objective-C".
* In the Project field, select the xcodeproj "Runner" (blue color).
* In the Target to be Tested, select xcworkspace "Runner" (white color).
1. A RunnerUITests folder should be created and you can start hacking in `RunnerUITests.m`.
1. To enable the test on CI, the plugin needs to be removed from the "skip" list:
* Open `./cirrus.yml` and find PLUGINS_TO_SKIP_XCTESTS.
* Remove the plugin name from the list.

## Running the tests

### Integration tests
Expand Down Expand Up @@ -84,22 +106,41 @@ cd android
./gradlew test
```

### XCTests (iOS)

XCUnitTests are typically configured to run with cocoapods in this repo. To run all the XCUnitTests for a plugin:

```console
cd ios
pod lib lint --allow-warnings
```

XCUITests aren't usually configured with cocoapods in this repo. They are configured in a xcode workspace target named RunnerUITests.
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)

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:

```console
pub global activate flutter_plugin_tools
cd <path_to_plugins>/packages
pub global run flutter_plugin_tools xctest --target RunnerUITests --skip <plugins_to_skip>
```

## Contributing code

We gladly accept contributions via GitHub pull requests.

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

To start working on a patch:

* `git fetch upstream`
* `git checkout upstream/master -b <name_of_your_branch>`
* Hack away.
* Verify changes with [flutter_plugin_tools](https://pub.dartlang.org/packages/flutter_plugin_tools)
* Verify changes with [flutter_plugin_tools](https://pub.dev/packages/flutter_plugin_tools)
```
pub global activate flutter_plugin_tools
pub global run flutter_plugin_tools format --plugins plugin_name
Expand Down
3 changes: 3 additions & 0 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ analyzer:
# Ignore generated files
- '**/*.g.dart'
- 'lib/src/generated/*.dart'
errors:
always_require_non_null_named_parameters: false # not needed with nnbd
unnecessary_null_comparison: false # Turned as long as nnbd mix-mode is supported.
linter:
rules:
- public_member_api_docs
16 changes: 16 additions & 0 deletions packages/android_alarm_manager/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
## 0.4.5+20

* Update the example app: remove the deprecated `RaisedButton` and `FlatButton` widgets.

## 0.4.5+19

* Fix outdated links across a number of markdown files ([#3276](https://github.com/flutter/plugins/pull/3276))

## 0.4.5+18

* Update Flutter SDK constraint.

## 0.4.5+17

* Update Dart SDK constraint in example.

## 0.4.5+16

* Remove unnecessary workaround from test.
Expand Down
8 changes: 4 additions & 4 deletions packages/android_alarm_manager/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# android_alarm_manager

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

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

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

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

For help on editing plugin code, view the [documentation](https://flutter.io/platform-plugins/#edit-code).
For help on editing plugin code, view the [documentation](https://flutter.dev/docs/development/packages-and-plugins/developing-packages#plugin).
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
android:name="io.flutter.plugins.androidalarmmanager.RebootBroadcastReceiver"
android:enabled="false">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"></action>
<action android:name="android.intent.action.BOOT_COMPLETED"/>
</intent-filter>
</receiver>
<meta-data
Expand Down
2 changes: 1 addition & 1 deletion packages/android_alarm_manager/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ class _AlarmHomePageState extends State<_AlarmHomePage> {
),
],
),
RaisedButton(
ElevatedButton(
child: Text(
'Schedule OneShot Alarm',
),
Expand Down
4 changes: 4 additions & 0 deletions packages/android_alarm_manager/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,7 @@ dev_dependencies:

flutter:
uses-material-design: true

environment:
sdk: ">=2.1.0 <3.0.0"
flutter: ">=1.12.13+hotfix.5 <2.0.0"
Loading

0 comments on commit 4600705

Please sign in to comment.