Skip to content

Commit

Permalink
Merge branch 'master' into add_zoom_to_android_webview
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
NickalasB committed Mar 3, 2021
2 parents 01760ef + 025c8c1 commit a0e64b5
Show file tree
Hide file tree
Showing 128 changed files with 4,706 additions and 1,101 deletions.
44 changes: 7 additions & 37 deletions .cirrus.yml
Expand Up @@ -16,10 +16,12 @@ task:
- flutter channel master
- flutter upgrade
- git fetch origin master
submodules_script:
- git submodule init
- git submodule update
matrix:
- name: plugin_tools_tests
script:
- cd script/tool
- pub get
- CIRRUS_BUILD_ID=null pub run test
- name: publishable
script:
- flutter channel master
Expand Down Expand Up @@ -132,9 +134,6 @@ task:
- flutter channel master
- flutter upgrade
- git fetch origin master
submodules_script:
- git submodule init
- git submodule update
matrix:
- name: build-linux+drive-examples
install_script:
Expand All @@ -161,9 +160,6 @@ task:
- flutter channel master
- flutter upgrade
- git fetch origin master
submodules_script:
- git submodule init
- git submodule update
create_simulator_script:
- xcrun simctl list
- xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-11 com.apple.CoreSimulator.SimRuntime.iOS-14-3 | xargs xcrun simctl boot
Expand All @@ -183,7 +179,7 @@ task:
- name: build-ipas+drive-examples
env:
PATH: $PATH:/usr/local/bin
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"
PLUGINS_TO_SKIP_XCTESTS: "integration_test"
matrix:
PLUGIN_SHARDING: "--shardIndex 0 --shardCount 4"
PLUGIN_SHARDING: "--shardIndex 1 --shardCount 4"
Expand All @@ -201,34 +197,11 @@ task:
- flutter channel $CHANNEL
- flutter upgrade
- ./script/incremental_build.sh build-examples --ipa
- ./script/incremental_build.sh xctest --target RunnerUITests --skip $PLUGINS_TO_SKIP_XCTESTS --ios-destination "platform=iOS Simulator,name=iPhone 11,OS=14.3"
- ./script/incremental_build.sh xctest --skip $PLUGINS_TO_SKIP_XCTESTS --ios-destination "platform=iOS Simulator,name=iPhone 11,OS=latest"
# `drive-examples` contains integration tests, which changes the UI of the application.
# This UI change sometimes affects `xctest`.
# So we run `drive-examples` after `xctest`, changing the order will result ci failure.
- ./script/incremental_build.sh drive-examples --ios

task:
# Xcode 11 task
# TODO(cyanglaz): merge Xcode 11 task to Xcode 12 task when all the matrix can be run in Xcode 12.
# don't run on release tags since it creates O(n^2) tasks where n is the number of plugins
only_if: $CIRRUS_TAG == ''
use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true'
osx_instance:
image: catalina-xcode-11.3.1-flutter
upgrade_script:
- sudo gem install cocoapods
- flutter channel stable
- flutter upgrade
- flutter channel master
- flutter upgrade
- git fetch origin master
submodules_script:
- git submodule init
- git submodule update
create_simulator_script:
- xcrun simctl list
- xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-X com.apple.CoreSimulator.SimRuntime.iOS-13-3 | xargs xcrun simctl boot
matrix:
- name: lint_darwin_plugins
env:
matrix:
Expand All @@ -254,9 +227,6 @@ task:
- flutter channel master
- flutter upgrade
- git fetch origin master
submodules_script:
- git submodule init
- git submodule update
matrix:
- name: build_all_plugins_app
script:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -17,6 +17,7 @@ Pods/
.symlinks/
**/Flutter/App.framework/
**/Flutter/ephemeral/
**/Flutter/Flutter.podspec
**/Flutter/Flutter.framework/
**/Flutter/Generated.xcconfig
**/Flutter/flutter_assets/
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Expand Up @@ -69,7 +69,7 @@ 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 "product name" field, type in "RunnerUITests".
* 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.
Expand Down
3 changes: 2 additions & 1 deletion packages/android_intent/pubspec.yaml
Expand Up @@ -17,10 +17,11 @@ dependencies:
meta: ^1.3.0
dev_dependencies:
test: ^1.16.3
mockito: ^5.0.0-nullsafety.7
mockito: ^5.0.0
flutter_test:
sdk: flutter
pedantic: ^1.10.0
build_runner: ^1.11.1

environment:
sdk: ">=2.12.0-259.9.beta <3.0.0"
Expand Down
14 changes: 8 additions & 6 deletions packages/android_intent/test/android_intent_test.dart
Expand Up @@ -2,23 +2,27 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// @dart = 2.9

import 'package:android_intent/flag.dart';
import 'package:flutter/services.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:android_intent/android_intent.dart';
import 'package:mockito/annotations.dart';
import 'package:mockito/mockito.dart';
import 'package:platform/platform.dart';

import 'android_intent_test.mocks.dart';

@GenerateMocks([MethodChannel])
void main() {
AndroidIntent androidIntent;
MockMethodChannel mockChannel;
late AndroidIntent androidIntent;
late MockMethodChannel mockChannel;

setUp(() {
mockChannel = MockMethodChannel();
when(mockChannel.invokeMethod<bool>('canResolveActivity', any))
.thenAnswer((realInvocation) async => true);
when(mockChannel.invokeMethod<void>('launch', any))
.thenAnswer((realInvocation) async => {});
});

group('AndroidIntent', () {
Expand Down Expand Up @@ -178,5 +182,3 @@ void main() {
});
});
}

class MockMethodChannel extends Mock implements MethodChannel {}
64 changes: 64 additions & 0 deletions packages/android_intent/test/android_intent_test.mocks.dart
@@ -0,0 +1,64 @@
// Mocks generated by Mockito 5.0.0 from annotations
// in android_intent/test/android_intent_test.dart.
// Do not manually edit this file.

import 'dart:async' as _i5;

import 'package:flutter/src/services/binary_messenger.dart' as _i3;
import 'package:flutter/src/services/message_codec.dart' as _i2;
import 'package:flutter/src/services/platform_channel.dart' as _i4;
import 'package:mockito/mockito.dart' as _i1;

// ignore_for_file: comment_references
// ignore_for_file: unnecessary_parenthesis

class _FakeMethodCodec extends _i1.Fake implements _i2.MethodCodec {}

class _FakeBinaryMessenger extends _i1.Fake implements _i3.BinaryMessenger {}

/// A class which mocks [MethodChannel].
///
/// See the documentation for Mockito's code generation for more information.
class MockMethodChannel extends _i1.Mock implements _i4.MethodChannel {
MockMethodChannel() {
_i1.throwOnMissingStub(this);
}

@override
String get name =>
(super.noSuchMethod(Invocation.getter(#name), returnValue: '') as String);
@override
_i2.MethodCodec get codec => (super.noSuchMethod(Invocation.getter(#codec),
returnValue: _FakeMethodCodec()) as _i2.MethodCodec);
@override
_i3.BinaryMessenger get binaryMessenger =>
(super.noSuchMethod(Invocation.getter(#binaryMessenger),
returnValue: _FakeBinaryMessenger()) as _i3.BinaryMessenger);
@override
_i5.Future<T?> invokeMethod<T>(String? method, [dynamic arguments]) =>
(super.noSuchMethod(Invocation.method(#invokeMethod, [method, arguments]),
returnValue: Future.value(null)) as _i5.Future<T?>);
@override
_i5.Future<List<T>?> invokeListMethod<T>(String? method,
[dynamic arguments]) =>
(super.noSuchMethod(
Invocation.method(#invokeListMethod, [method, arguments]),
returnValue: Future.value(<T>[])) as _i5.Future<List<T>?>);
@override
_i5.Future<Map<K, V>?> invokeMapMethod<K, V>(String? method,
[dynamic arguments]) =>
(super.noSuchMethod(
Invocation.method(#invokeMapMethod, [method, arguments]),
returnValue: Future.value(<K, V>{})) as _i5.Future<Map<K, V>?>);
@override
bool checkMethodCallHandler(
_i5.Future<dynamic> Function(_i2.MethodCall)? handler) =>
(super.noSuchMethod(Invocation.method(#checkMethodCallHandler, [handler]),
returnValue: false) as bool);
@override
bool checkMockMethodCallHandler(
_i5.Future<dynamic> Function(_i2.MethodCall)? handler) =>
(super.noSuchMethod(
Invocation.method(#checkMockMethodCallHandler, [handler]),
returnValue: false) as bool);
}
4 changes: 4 additions & 0 deletions packages/battery/battery/CHANGELOG.md
@@ -1,3 +1,7 @@
## 2.0.1

* Update platform_plugin_interface version requirement.

## 2.0.0

* Migrate to null safety.
Expand Down
4 changes: 2 additions & 2 deletions packages/battery/battery/pubspec.yaml
Expand Up @@ -2,7 +2,7 @@ name: battery
description: Flutter plugin for accessing information about the battery state
(full, charging, discharging) on Android and iOS.
homepage: https://github.com/flutter/plugins/tree/master/packages/battery/battery
version: 2.0.0
version: 2.0.1

flutter:
plugin:
Expand All @@ -22,7 +22,7 @@ dependencies:
dev_dependencies:
flutter_test:
sdk: flutter
plugin_platform_interface: ">=1.0.0 <3.0.0"
plugin_platform_interface: ^2.0.0
integration_test:
path: ../../integration_test
pedantic: ^1.10.0
Expand Down
4 changes: 4 additions & 0 deletions packages/battery/battery_platform_interface/CHANGELOG.md
@@ -1,3 +1,7 @@
## 2.0.1

* Update platform_plugin_interface version requirement.

## 2.0.0

* Migrate to null safety.
Expand Down
4 changes: 2 additions & 2 deletions packages/battery/battery_platform_interface/pubspec.yaml
Expand Up @@ -3,13 +3,13 @@ description: A common platform interface for the battery plugin.
homepage: https://github.com/flutter/plugins/tree/master/packages/battery
# NOTE: We strongly prefer non-breaking changes, even at the expense of a
# less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes
version: 2.0.0
version: 2.0.1

dependencies:
flutter:
sdk: flutter
meta: ^1.3.0
plugin_platform_interface: ">=1.0.0 <3.0.0"
plugin_platform_interface: ^2.0.0

dev_dependencies:
flutter_test:
Expand Down
15 changes: 3 additions & 12 deletions packages/camera/camera/CHANGELOG.md
@@ -1,18 +1,9 @@
## 0.8.0-nullsafety.3

* Updates the example code listed in the [README.md](README.md), so it runs without errors when you simply copy/ paste it into a Flutter App.

## 0.8.0-nullsafety.2
## 0.8.0

* Stable null safety release.
* Solved delay when using the zoom feature on iOS.

## 0.8.0-nullsafety.1

* Added a timeout to the pre-capture sequence on Android to prevent crashes when the camera cannot get a focus.

## 0.8.0-nullsafety

* Migrated to null safety.
* Updates the example code listed in the [README.md](README.md), so it runs without errors when you simply copy/ paste it into a Flutter App.

## 0.7.0+4

Expand Down
@@ -1,3 +1,10 @@
// Copyright 2019, the Chromium project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// TODO(mvanbeusekom): Remove this once flutter_driver supports null safety.
// https://github.com/flutter/flutter/issues/71379
// @dart = 2.9
import 'dart:async';
import 'dart:io';
import 'dart:ui';
Expand Down

0 comments on commit a0e64b5

Please sign in to comment.