From 23abf27014f22bae40e7cccdbe63c4d564de92e7 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Fri, 19 Feb 2021 14:33:38 -0800 Subject: [PATCH 1/6] migrate connectivity platform interface to stable --- .../connectivity_platform_interface/CHANGELOG.md | 6 +----- .../connectivity_platform_interface/pubspec.yaml | 10 +++++----- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/packages/connectivity/connectivity_platform_interface/CHANGELOG.md b/packages/connectivity/connectivity_platform_interface/CHANGELOG.md index 8e38341be42f..0b26cd52c9e9 100644 --- a/packages/connectivity/connectivity_platform_interface/CHANGELOG.md +++ b/packages/connectivity/connectivity_platform_interface/CHANGELOG.md @@ -1,8 +1,4 @@ -## 2.0.0-nullsafety.1 - -* Bump Dart SDK to support null safety. - -## 2.0.0-nullsafety +## 2.0.0 * Migrate to null safety. diff --git a/packages/connectivity/connectivity_platform_interface/pubspec.yaml b/packages/connectivity/connectivity_platform_interface/pubspec.yaml index 114915a10b60..1e89972dd816 100644 --- a/packages/connectivity/connectivity_platform_interface/pubspec.yaml +++ b/packages/connectivity/connectivity_platform_interface/pubspec.yaml @@ -3,19 +3,19 @@ description: A common platform interface for the connectivity plugin. homepage: https://github.com/flutter/plugins/tree/master/packages/connectivity/connectivity_platform_interface # 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-nullsafety.1 +version: 2.0.0 dependencies: flutter: sdk: flutter - meta: ^1.3.0-nullsafety.3 - plugin_platform_interface: ^1.1.0-nullsafety.1 + meta: ^1.3.0 + plugin_platform_interface: ">=1.0.0 <3.0.0" dev_dependencies: flutter_test: sdk: flutter - pedantic: ^1.10.0-nullsafety.1 + pedantic: ^1.10.0 environment: - sdk: ">=2.12.0-0 <3.0.0" + sdk: ">=2.12.0-259.9.beta <3.0.0" flutter: ">=1.12.13+hotfix.5" From 54057f89e7c3d9e4add4830a8a7fdfbb91fcb0b9 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Mon, 22 Feb 2021 10:19:16 -0800 Subject: [PATCH 2/6] stable release --- .../connectivity/connectivity/CHANGELOG.md | 11 +---------- .../connectivity/example/pubspec.yaml | 6 +++--- .../test_driver/test/integration_test.dart | 4 ---- .../connectivity/connectivity/pubspec.yaml | 18 +++++++++--------- 4 files changed, 13 insertions(+), 26 deletions(-) diff --git a/packages/connectivity/connectivity/CHANGELOG.md b/packages/connectivity/connectivity/CHANGELOG.md index a1d0231a5bd4..c6432f3179a0 100644 --- a/packages/connectivity/connectivity/CHANGELOG.md +++ b/packages/connectivity/connectivity/CHANGELOG.md @@ -1,17 +1,8 @@ -## 3.0.0-nullsafety.3 +## 3.0.0 * Fix outdated links across a number of markdown files ([#3276](https://github.com/flutter/plugins/pull/3276)) - -## 3.0.0-nullsafety.2 - * Android: Cleanup the NetworkCallback object when a connectivity stream is cancelled - -## 3.0.0-nullsafety.1 - * Bump Dart SDK to support null safety. - -## 3.0.0-nullsafety - * Migrate to null safety. ## 2.0.3 diff --git a/packages/connectivity/connectivity/example/pubspec.yaml b/packages/connectivity/connectivity/example/pubspec.yaml index b50214619c13..6395dc38c3ae 100644 --- a/packages/connectivity/connectivity/example/pubspec.yaml +++ b/packages/connectivity/connectivity/example/pubspec.yaml @@ -15,14 +15,14 @@ dependencies: dev_dependencies: flutter_driver: sdk: flutter - test: ^1.10.0-nullsafety.1 + test: ^1.16.3 integration_test: path: ../../../integration_test - pedantic: ^1.10.0-nullsafety.1 + pedantic: ^1.10.0 flutter: uses-material-design: true environment: - sdk: ">=2.12.0-0 <3.0.0" + sdk: ">=2.12.0-259.9.beta <3.0.0" flutter: ">=1.12.13+hotfix.5" diff --git a/packages/connectivity/connectivity/example/test_driver/test/integration_test.dart b/packages/connectivity/connectivity/example/test_driver/test/integration_test.dart index 33421c335bdd..c0cbdcab2fb6 100644 --- a/packages/connectivity/connectivity/example/test_driver/test/integration_test.dart +++ b/packages/connectivity/connectivity/example/test_driver/test/integration_test.dart @@ -2,10 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// TODO(amirh): Remove this once flutter_driver supports null safety. -// https://github.com/flutter/flutter/issues/71379 -// @dart = 2.9 - import 'dart:convert'; import 'dart:io'; import 'package:flutter_driver/flutter_driver.dart'; diff --git a/packages/connectivity/connectivity/pubspec.yaml b/packages/connectivity/connectivity/pubspec.yaml index 7ae03553a26c..5e31f6065035 100644 --- a/packages/connectivity/connectivity/pubspec.yaml +++ b/packages/connectivity/connectivity/pubspec.yaml @@ -2,7 +2,7 @@ name: connectivity description: Flutter plugin for discovering the state of the network (WiFi & mobile/cellular) connectivity on Android and iOS. homepage: https://github.com/flutter/plugins/tree/master/packages/connectivity/connectivity -version: 3.0.0-nullsafety.3 +version: 3.0.0 flutter: plugin: @@ -20,11 +20,11 @@ flutter: dependencies: flutter: sdk: flutter - meta: ^1.0.5 - connectivity_platform_interface: ^2.0.0-nullsafety.1 + meta: ^1.3.0 + connectivity_platform_interface: ^2.0.0 #TODO(cyanglaz): re-endorse the below plugins when they have migrated to nnbd. # https://github.com/flutter/flutter/issues/68669 - connectivity_macos: ^0.2.0-nullsafety + # connectivity_macos: ^0.2.0-nullsafety # connectivity_for_web: ^0.3.0 dev_dependencies: @@ -32,13 +32,13 @@ dev_dependencies: sdk: flutter flutter_driver: sdk: flutter - test: ^1.10.0-nullsafety.1 + test: ^1.16.3 integration_test: path: ../../integration_test - mockito: ^4.1.1 - plugin_platform_interface: ^1.1.0-nullsafety.1 - pedantic: ^1.10.0-nullsafety.1 + mockito: ^5.0.0-nullsafety.7 + plugin_platform_interface: ">=1.0.0 <3.0.0" + pedantic: ^1.10.0 environment: - sdk: ">=2.12.0-0 <3.0.0" + sdk: ">=2.12.0-259.9.beta <3.0.0" flutter: ">=1.12.13+hotfix.5" From 9f007e8714a5270c10c7e0f9f2d2ae702dc4f04a Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Mon, 22 Feb 2021 10:43:59 -0800 Subject: [PATCH 3/6] remove mockito --- packages/connectivity/connectivity/pubspec.yaml | 1 - .../connectivity/connectivity/test/connectivity_test.dart | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/connectivity/connectivity/pubspec.yaml b/packages/connectivity/connectivity/pubspec.yaml index 5e31f6065035..cddaae2762d6 100644 --- a/packages/connectivity/connectivity/pubspec.yaml +++ b/packages/connectivity/connectivity/pubspec.yaml @@ -35,7 +35,6 @@ dev_dependencies: test: ^1.16.3 integration_test: path: ../../integration_test - mockito: ^5.0.0-nullsafety.7 plugin_platform_interface: ">=1.0.0 <3.0.0" pedantic: ^1.10.0 diff --git a/packages/connectivity/connectivity/test/connectivity_test.dart b/packages/connectivity/connectivity/test/connectivity_test.dart index e83196546cd2..6747c79bb64a 100644 --- a/packages/connectivity/connectivity/test/connectivity_test.dart +++ b/packages/connectivity/connectivity/test/connectivity_test.dart @@ -8,7 +8,7 @@ import 'package:connectivity/connectivity.dart'; import 'package:connectivity_platform_interface/connectivity_platform_interface.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:plugin_platform_interface/plugin_platform_interface.dart'; -import 'package:mockito/mockito.dart'; +import 'package:test/fake.dart'; const ConnectivityResult kCheckConnectivityResult = ConnectivityResult.wifi; const LocationAuthorizationStatus kRequestLocationResult = @@ -33,7 +33,7 @@ void main() { }); } -class MockConnectivityPlatform extends Mock +class MockConnectivityPlatform extends Fake with MockPlatformInterfaceMixin implements ConnectivityPlatform { Future checkConnectivity() async { From 8183719f479c74ed45cda73a6d3d97d22bc4f699 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Mon, 22 Feb 2021 10:45:22 -0800 Subject: [PATCH 4/6] revert deps removal --- packages/connectivity/connectivity/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/connectivity/connectivity/pubspec.yaml b/packages/connectivity/connectivity/pubspec.yaml index cddaae2762d6..254e325203d1 100644 --- a/packages/connectivity/connectivity/pubspec.yaml +++ b/packages/connectivity/connectivity/pubspec.yaml @@ -24,7 +24,7 @@ dependencies: connectivity_platform_interface: ^2.0.0 #TODO(cyanglaz): re-endorse the below plugins when they have migrated to nnbd. # https://github.com/flutter/flutter/issues/68669 - # connectivity_macos: ^0.2.0-nullsafety + connectivity_macos: ^0.2.0 # connectivity_for_web: ^0.3.0 dev_dependencies: From 140bafc00e9aa46f18dced2160b7c26845dbd501 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Mon, 22 Feb 2021 11:01:43 -0800 Subject: [PATCH 5/6] review --- packages/connectivity/connectivity/CHANGELOG.md | 3 +-- .../example/test_driver/test/integration_test.dart | 4 ++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/connectivity/connectivity/CHANGELOG.md b/packages/connectivity/connectivity/CHANGELOG.md index c6432f3179a0..c4566ae73fd0 100644 --- a/packages/connectivity/connectivity/CHANGELOG.md +++ b/packages/connectivity/connectivity/CHANGELOG.md @@ -1,9 +1,8 @@ ## 3.0.0 +* Migrate to null safety. * Fix outdated links across a number of markdown files ([#3276](https://github.com/flutter/plugins/pull/3276)) * Android: Cleanup the NetworkCallback object when a connectivity stream is cancelled -* Bump Dart SDK to support null safety. -* Migrate to null safety. ## 2.0.3 diff --git a/packages/connectivity/connectivity/example/test_driver/test/integration_test.dart b/packages/connectivity/connectivity/example/test_driver/test/integration_test.dart index c0cbdcab2fb6..33421c335bdd 100644 --- a/packages/connectivity/connectivity/example/test_driver/test/integration_test.dart +++ b/packages/connectivity/connectivity/example/test_driver/test/integration_test.dart @@ -2,6 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// TODO(amirh): Remove this once flutter_driver supports null safety. +// https://github.com/flutter/flutter/issues/71379 +// @dart = 2.9 + import 'dart:convert'; import 'dart:io'; import 'package:flutter_driver/flutter_driver.dart'; From 45fd52f3a74c1fe265969d17e79773e6c5aae179 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Mon, 22 Feb 2021 17:40:35 -0800 Subject: [PATCH 6/6] rerun ci