Skip to content

Commit a0e64b5

Browse files
committed
Merge branch 'master' into add_zoom_to_android_webview
* master: Adopt Xcode 12 for podspec lints (flutter#3653) Run static analyzer during xctest (flutter#3667) [google_maps_flutter_web] update min flutter sdk version to 1.20.0 (flutter#3662) [image_picker] Run CocoaPods iOS tests in RunnerUITests target (flutter#3663) [webview_flutter] Run CocoaPods iOS tests in RunnerUITests target (flutter#3664) [device_info] Enable NNBD for unit test (flutter#3658) remove unused plugin (flutter#3661) [android_intent] move unit test to nullsafety (flutter#3659) [url_launcher] Migrate unit tests to NNBD (flutter#3657) [share] Migrate unit tests to null-safety. (flutter#3660) [connectivity_for_web] Migration to null-safety. (flutter#3652) [camera] Stable release for null safety. (flutter#3641) [in_app_purchase] fix plugin version (flutter#3654) Move plugin tool tests over (flutter#3606) [in_app_purchase] migrate playing billing library to v3 (flutter#3636) Update plugin_platform_interface min version (flutter#3650) # Conflicts: # packages/webview_flutter/CHANGELOG.md # packages/webview_flutter/example/ios/Runner.xcodeproj/project.pbxproj
2 parents 01760ef + 025c8c1 commit a0e64b5

File tree

128 files changed

+4706
-1101
lines changed

Some content is hidden

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

128 files changed

+4706
-1101
lines changed

.cirrus.yml

Lines changed: 7 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@ task:
1616
- flutter channel master
1717
- flutter upgrade
1818
- git fetch origin master
19-
submodules_script:
20-
- git submodule init
21-
- git submodule update
2219
matrix:
20+
- name: plugin_tools_tests
21+
script:
22+
- cd script/tool
23+
- pub get
24+
- CIRRUS_BUILD_ID=null pub run test
2325
- name: publishable
2426
script:
2527
- flutter channel master
@@ -132,9 +134,6 @@ task:
132134
- flutter channel master
133135
- flutter upgrade
134136
- git fetch origin master
135-
submodules_script:
136-
- git submodule init
137-
- git submodule update
138137
matrix:
139138
- name: build-linux+drive-examples
140139
install_script:
@@ -161,9 +160,6 @@ task:
161160
- flutter channel master
162161
- flutter upgrade
163162
- git fetch origin master
164-
submodules_script:
165-
- git submodule init
166-
- git submodule update
167163
create_simulator_script:
168164
- xcrun simctl list
169165
- xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-11 com.apple.CoreSimulator.SimRuntime.iOS-14-3 | xargs xcrun simctl boot
@@ -183,7 +179,7 @@ task:
183179
- name: build-ipas+drive-examples
184180
env:
185181
PATH: $PATH:/usr/local/bin
186-
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,sensors,shared_preferences/shared_preferences,url_launcher/url_launcher,video_player/video_player,webview_flutter,wifi_info_flutter/wifi_info_flutter"
182+
PLUGINS_TO_SKIP_XCTESTS: "integration_test"
187183
matrix:
188184
PLUGIN_SHARDING: "--shardIndex 0 --shardCount 4"
189185
PLUGIN_SHARDING: "--shardIndex 1 --shardCount 4"
@@ -201,34 +197,11 @@ task:
201197
- flutter channel $CHANNEL
202198
- flutter upgrade
203199
- ./script/incremental_build.sh build-examples --ipa
204-
- ./script/incremental_build.sh xctest --target RunnerUITests --skip $PLUGINS_TO_SKIP_XCTESTS --ios-destination "platform=iOS Simulator,name=iPhone 11,OS=14.3"
200+
- ./script/incremental_build.sh xctest --skip $PLUGINS_TO_SKIP_XCTESTS --ios-destination "platform=iOS Simulator,name=iPhone 11,OS=latest"
205201
# `drive-examples` contains integration tests, which changes the UI of the application.
206202
# This UI change sometimes affects `xctest`.
207203
# So we run `drive-examples` after `xctest`, changing the order will result ci failure.
208204
- ./script/incremental_build.sh drive-examples --ios
209-
210-
task:
211-
# Xcode 11 task
212-
# TODO(cyanglaz): merge Xcode 11 task to Xcode 12 task when all the matrix can be run in Xcode 12.
213-
# don't run on release tags since it creates O(n^2) tasks where n is the number of plugins
214-
only_if: $CIRRUS_TAG == ''
215-
use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true'
216-
osx_instance:
217-
image: catalina-xcode-11.3.1-flutter
218-
upgrade_script:
219-
- sudo gem install cocoapods
220-
- flutter channel stable
221-
- flutter upgrade
222-
- flutter channel master
223-
- flutter upgrade
224-
- git fetch origin master
225-
submodules_script:
226-
- git submodule init
227-
- git submodule update
228-
create_simulator_script:
229-
- xcrun simctl list
230-
- xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-X com.apple.CoreSimulator.SimRuntime.iOS-13-3 | xargs xcrun simctl boot
231-
matrix:
232205
- name: lint_darwin_plugins
233206
env:
234207
matrix:
@@ -254,9 +227,6 @@ task:
254227
- flutter channel master
255228
- flutter upgrade
256229
- git fetch origin master
257-
submodules_script:
258-
- git submodule init
259-
- git submodule update
260230
matrix:
261231
- name: build_all_plugins_app
262232
script:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Pods/
1717
.symlinks/
1818
**/Flutter/App.framework/
1919
**/Flutter/ephemeral/
20+
**/Flutter/Flutter.podspec
2021
**/Flutter/Flutter.framework/
2122
**/Flutter/Generated.xcconfig
2223
**/Flutter/flutter_assets/

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ If XCUITests has not been set up for the plugin, follow these steps to set it up
6969
1. Open <path_to_plugin>/example/ios/Runner.xcworkspace using XCode.
7070
1. Create a new "UI Testing Bundle".
7171
1. In the target options window, populate details as following, then click on "Finish".
72-
* In the "product name" field, type in "RunnerUITests" (this is the test target name our CI looks for.).
72+
* In the "product name" field, type in "RunnerUITests".
7373
* In the "Team" field, select "None".
7474
* In the Organization Name field, type in "Flutter". This should usually be pre-populated.
7575
* In the organization identifer field, type in "com.google". This should usually be pre-populated.

packages/android_intent/pubspec.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,11 @@ dependencies:
1717
meta: ^1.3.0
1818
dev_dependencies:
1919
test: ^1.16.3
20-
mockito: ^5.0.0-nullsafety.7
20+
mockito: ^5.0.0
2121
flutter_test:
2222
sdk: flutter
2323
pedantic: ^1.10.0
24+
build_runner: ^1.11.1
2425

2526
environment:
2627
sdk: ">=2.12.0-259.9.beta <3.0.0"

packages/android_intent/test/android_intent_test.dart

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,27 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
// @dart = 2.9
6-
75
import 'package:android_intent/flag.dart';
86
import 'package:flutter/services.dart';
97
import 'package:flutter_test/flutter_test.dart';
108
import 'package:android_intent/android_intent.dart';
9+
import 'package:mockito/annotations.dart';
1110
import 'package:mockito/mockito.dart';
1211
import 'package:platform/platform.dart';
1312

13+
import 'android_intent_test.mocks.dart';
14+
15+
@GenerateMocks([MethodChannel])
1416
void main() {
15-
AndroidIntent androidIntent;
16-
MockMethodChannel mockChannel;
17+
late AndroidIntent androidIntent;
18+
late MockMethodChannel mockChannel;
1719

1820
setUp(() {
1921
mockChannel = MockMethodChannel();
2022
when(mockChannel.invokeMethod<bool>('canResolveActivity', any))
2123
.thenAnswer((realInvocation) async => true);
24+
when(mockChannel.invokeMethod<void>('launch', any))
25+
.thenAnswer((realInvocation) async => {});
2226
});
2327

2428
group('AndroidIntent', () {
@@ -178,5 +182,3 @@ void main() {
178182
});
179183
});
180184
}
181-
182-
class MockMethodChannel extends Mock implements MethodChannel {}
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
// Mocks generated by Mockito 5.0.0 from annotations
2+
// in android_intent/test/android_intent_test.dart.
3+
// Do not manually edit this file.
4+
5+
import 'dart:async' as _i5;
6+
7+
import 'package:flutter/src/services/binary_messenger.dart' as _i3;
8+
import 'package:flutter/src/services/message_codec.dart' as _i2;
9+
import 'package:flutter/src/services/platform_channel.dart' as _i4;
10+
import 'package:mockito/mockito.dart' as _i1;
11+
12+
// ignore_for_file: comment_references
13+
// ignore_for_file: unnecessary_parenthesis
14+
15+
class _FakeMethodCodec extends _i1.Fake implements _i2.MethodCodec {}
16+
17+
class _FakeBinaryMessenger extends _i1.Fake implements _i3.BinaryMessenger {}
18+
19+
/// A class which mocks [MethodChannel].
20+
///
21+
/// See the documentation for Mockito's code generation for more information.
22+
class MockMethodChannel extends _i1.Mock implements _i4.MethodChannel {
23+
MockMethodChannel() {
24+
_i1.throwOnMissingStub(this);
25+
}
26+
27+
@override
28+
String get name =>
29+
(super.noSuchMethod(Invocation.getter(#name), returnValue: '') as String);
30+
@override
31+
_i2.MethodCodec get codec => (super.noSuchMethod(Invocation.getter(#codec),
32+
returnValue: _FakeMethodCodec()) as _i2.MethodCodec);
33+
@override
34+
_i3.BinaryMessenger get binaryMessenger =>
35+
(super.noSuchMethod(Invocation.getter(#binaryMessenger),
36+
returnValue: _FakeBinaryMessenger()) as _i3.BinaryMessenger);
37+
@override
38+
_i5.Future<T?> invokeMethod<T>(String? method, [dynamic arguments]) =>
39+
(super.noSuchMethod(Invocation.method(#invokeMethod, [method, arguments]),
40+
returnValue: Future.value(null)) as _i5.Future<T?>);
41+
@override
42+
_i5.Future<List<T>?> invokeListMethod<T>(String? method,
43+
[dynamic arguments]) =>
44+
(super.noSuchMethod(
45+
Invocation.method(#invokeListMethod, [method, arguments]),
46+
returnValue: Future.value(<T>[])) as _i5.Future<List<T>?>);
47+
@override
48+
_i5.Future<Map<K, V>?> invokeMapMethod<K, V>(String? method,
49+
[dynamic arguments]) =>
50+
(super.noSuchMethod(
51+
Invocation.method(#invokeMapMethod, [method, arguments]),
52+
returnValue: Future.value(<K, V>{})) as _i5.Future<Map<K, V>?>);
53+
@override
54+
bool checkMethodCallHandler(
55+
_i5.Future<dynamic> Function(_i2.MethodCall)? handler) =>
56+
(super.noSuchMethod(Invocation.method(#checkMethodCallHandler, [handler]),
57+
returnValue: false) as bool);
58+
@override
59+
bool checkMockMethodCallHandler(
60+
_i5.Future<dynamic> Function(_i2.MethodCall)? handler) =>
61+
(super.noSuchMethod(
62+
Invocation.method(#checkMockMethodCallHandler, [handler]),
63+
returnValue: false) as bool);
64+
}

packages/battery/battery/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 2.0.1
2+
3+
* Update platform_plugin_interface version requirement.
4+
15
## 2.0.0
26

37
* Migrate to null safety.

packages/battery/battery/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: battery
22
description: Flutter plugin for accessing information about the battery state
33
(full, charging, discharging) on Android and iOS.
44
homepage: https://github.com/flutter/plugins/tree/master/packages/battery/battery
5-
version: 2.0.0
5+
version: 2.0.1
66

77
flutter:
88
plugin:
@@ -22,7 +22,7 @@ dependencies:
2222
dev_dependencies:
2323
flutter_test:
2424
sdk: flutter
25-
plugin_platform_interface: ">=1.0.0 <3.0.0"
25+
plugin_platform_interface: ^2.0.0
2626
integration_test:
2727
path: ../../integration_test
2828
pedantic: ^1.10.0

packages/battery/battery_platform_interface/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 2.0.1
2+
3+
* Update platform_plugin_interface version requirement.
4+
15
## 2.0.0
26

37
* Migrate to null safety.

packages/battery/battery_platform_interface/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ description: A common platform interface for the battery plugin.
33
homepage: https://github.com/flutter/plugins/tree/master/packages/battery
44
# NOTE: We strongly prefer non-breaking changes, even at the expense of a
55
# less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes
6-
version: 2.0.0
6+
version: 2.0.1
77

88
dependencies:
99
flutter:
1010
sdk: flutter
1111
meta: ^1.3.0
12-
plugin_platform_interface: ">=1.0.0 <3.0.0"
12+
plugin_platform_interface: ^2.0.0
1313

1414
dev_dependencies:
1515
flutter_test:

0 commit comments

Comments
 (0)