[ci] Enable min SDK version checks (#3095)
* Roll tool version
* Enable new check in CI
* Fix violations
* CHANGELOG updates
* Fix changelog
* Address analyzer issues
* Revert flutter_lints changelog
diff --git a/.ci/scripts/prepare_tool.sh b/.ci/scripts/prepare_tool.sh
index 30ea0db..e98176b 100755
--- a/.ci/scripts/prepare_tool.sh
+++ b/.ci/scripts/prepare_tool.sh
@@ -8,4 +8,4 @@
# Pinned version of the plugin tools, to avoid breakage in this repository
# when pushing updates from flutter/plugins.
-dart pub global activate flutter_plugin_tools 0.13.2
+dart pub global activate flutter_plugin_tools 0.13.4
diff --git a/.cirrus.yml b/.cirrus.yml
index f13e6de..245ab63 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -99,7 +99,9 @@
always:
format_script: ./script/tool_runner.sh format --fail-on-change
license_script: $PLUGIN_TOOL_COMMAND license-check
- pubspec_script: ./script/tool_runner.sh pubspec-check
+ # The major and minor versions here should match the lowest version
+ # analyzed in legacy_version_analyze.
+ pubspec_script: ./script/tool_runner.sh pubspec-check --min-min-flutter-version=3.0.0 --min-min-dart-version=2.17.0
readme_script:
- ./script/tool_runner.sh readme-check
# Re-run with --require-excerpts, skipping packages that still need
@@ -157,6 +159,7 @@
- name: legacy_version_analyze
depends_on: analyze
matrix:
+ # Change the arguments to pubspec-check when changing these values.
env:
CHANNEL: "3.0.5"
DART_VERSION: "2.17.6"
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 44f1b23..b3b970d 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -31,7 +31,7 @@
with:
fetch-depth: 0 # Fetch all history so the tool can get all the tags to determine version.
- name: Set up tools
- run: dart pub global activate flutter_plugin_tools 0.13.2
+ run: dart pub global activate flutter_plugin_tools 0.13.4
# # This workflow should be the last to run. So wait for all the other tests to succeed.
- name: Wait on all tests
diff --git a/packages/animations/example/pubspec.yaml b/packages/animations/example/pubspec.yaml
index f5ad6eb..a855bd1 100644
--- a/packages/animations/example/pubspec.yaml
+++ b/packages/animations/example/pubspec.yaml
@@ -7,6 +7,7 @@
environment:
sdk: ">=2.12.0 <3.0.0"
+ flutter: ">=3.0.0"
dependencies:
animations:
diff --git a/packages/cross_file/CHANGELOG.md b/packages/cross_file/CHANGELOG.md
index 7ace46b..21d9dde 100644
--- a/packages/cross_file/CHANGELOG.md
+++ b/packages/cross_file/CHANGELOG.md
@@ -1,3 +1,7 @@
+## NEXT
+
+* Updates minimum SDK version to Flutter 3.0.
+
## 0.3.3+2
* Fixes lint warnings in tests.
diff --git a/packages/cross_file/lib/src/types/html.dart b/packages/cross_file/lib/src/types/html.dart
index cb3473b..4659ebd 100644
--- a/packages/cross_file/lib/src/types/html.dart
+++ b/packages/cross_file/lib/src/types/html.dart
@@ -26,6 +26,7 @@
///
/// `name` needs to be passed from the outside, since it's only available
/// while handling [html.File]s (when the ObjectUrl is created).
+ // ignore: use_super_parameters
XFile(
String path, {
String? mimeType,
diff --git a/packages/cross_file/lib/src/types/interface.dart b/packages/cross_file/lib/src/types/interface.dart
index eecfb03..3243d88 100644
--- a/packages/cross_file/lib/src/types/interface.dart
+++ b/packages/cross_file/lib/src/types/interface.dart
@@ -22,14 +22,14 @@
/// `path` of the file doesn't match what the user sees when selecting it
/// (like in web)
XFile(
- String path, {
+ super.path, {
String? mimeType,
String? name,
int? length,
Uint8List? bytes,
DateTime? lastModified,
@visibleForTesting CrossFileTestOverrides? overrides,
- }) : super(path) {
+ }) {
throw UnimplementedError(
'CrossFile is not available in your current platform.');
}
diff --git a/packages/cross_file/lib/src/types/io.dart b/packages/cross_file/lib/src/types/io.dart
index f9fcfea..597a2f8 100644
--- a/packages/cross_file/lib/src/types/io.dart
+++ b/packages/cross_file/lib/src/types/io.dart
@@ -17,6 +17,7 @@
/// [bytes] is ignored; the parameter exists only to match the web version of
/// the constructor. To construct a dart:io XFile from bytes, use
/// [XFile.fromData].
+ // ignore: use_super_parameters
XFile(
String path, {
String? mimeType,
diff --git a/packages/cross_file/pubspec.yaml b/packages/cross_file/pubspec.yaml
index e12652e..55e993d 100644
--- a/packages/cross_file/pubspec.yaml
+++ b/packages/cross_file/pubspec.yaml
@@ -5,7 +5,7 @@
version: 0.3.3+2
environment:
- sdk: ">=2.12.0 <3.0.0"
+ sdk: ">=2.17.0 <3.0.0"
dependencies:
js: ^0.6.3
diff --git a/packages/cross_file/test/x_file_io_test.dart b/packages/cross_file/test/x_file_io_test.dart
index cb762cb..4a676e2 100644
--- a/packages/cross_file/test/x_file_io_test.dart
+++ b/packages/cross_file/test/x_file_io_test.dart
@@ -109,7 +109,7 @@
/// An XFile subclass that tracks reads, for testing purposes.
class TestXFile extends XFile {
- TestXFile(String path) : super(path);
+ TestXFile(super.path);
bool hasBeenRead = false;
diff --git a/packages/flutter_lints/example/pubspec.yaml b/packages/flutter_lints/example/pubspec.yaml
index 0177756..13cdefa 100644
--- a/packages/flutter_lints/example/pubspec.yaml
+++ b/packages/flutter_lints/example/pubspec.yaml
@@ -4,7 +4,7 @@
publish_to: none
environment:
- sdk: '>=2.12.0 <3.0.0'
+ sdk: '>=2.17.0 <3.0.0'
# Add the latest version of `package:flutter_lints` as a dev_dependency. The
# lint set provided by this package is activated in the `analysis_options.yaml`
diff --git a/packages/flutter_lints/pubspec.yaml b/packages/flutter_lints/pubspec.yaml
index f0cd1e0..fae2fba 100644
--- a/packages/flutter_lints/pubspec.yaml
+++ b/packages/flutter_lints/pubspec.yaml
@@ -5,7 +5,7 @@
version: 2.0.1
environment:
- sdk: '>=2.17.0-0 <3.0.0'
+ sdk: '>=2.17.0 <3.0.0'
dependencies:
lints: ^2.0.0
diff --git a/packages/flutter_template_images/CHANGELOG.md b/packages/flutter_template_images/CHANGELOG.md
index 80bc746..8c49d1f 100644
--- a/packages/flutter_template_images/CHANGELOG.md
+++ b/packages/flutter_template_images/CHANGELOG.md
@@ -1,3 +1,7 @@
+## NEXT
+
+* Updates minimum SDK version to Flutter 3.0.
+
## 4.2.0
* Adds iOS template app icons, updated to square icons with no transparency.
diff --git a/packages/flutter_template_images/pubspec.yaml b/packages/flutter_template_images/pubspec.yaml
index 67f12dc..5b500a4 100644
--- a/packages/flutter_template_images/pubspec.yaml
+++ b/packages/flutter_template_images/pubspec.yaml
@@ -5,4 +5,4 @@
version: 4.2.0
environment:
- sdk: ">=2.12.0 <3.0.0"
+ sdk: ">=2.17.0 <3.0.0"
diff --git a/packages/metrics_center/CHANGELOG.md b/packages/metrics_center/CHANGELOG.md
index 6628b71..ec3aa37 100644
--- a/packages/metrics_center/CHANGELOG.md
+++ b/packages/metrics_center/CHANGELOG.md
@@ -1,3 +1,7 @@
+## NEXT
+
+* Updates minimum SDK version to Flutter 3.0.
+
## 1.0.6
- Fixes lint warnings.
diff --git a/packages/metrics_center/pubspec.yaml b/packages/metrics_center/pubspec.yaml
index 874d837..8391dad 100644
--- a/packages/metrics_center/pubspec.yaml
+++ b/packages/metrics_center/pubspec.yaml
@@ -6,7 +6,7 @@
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+metrics_center%22
environment:
- sdk: '>=2.12.0 <3.0.0'
+ sdk: '>=2.17.0 <3.0.0'
dependencies:
crypto: ^3.0.1
diff --git a/packages/multicast_dns/CHANGELOG.md b/packages/multicast_dns/CHANGELOG.md
index 76837a4..68aad38 100644
--- a/packages/multicast_dns/CHANGELOG.md
+++ b/packages/multicast_dns/CHANGELOG.md
@@ -1,3 +1,7 @@
+## NEXT
+
+* Updates minimum SDK version to Flutter 3.0.
+
## 0.3.2+2
* Fixes lints warnings.
diff --git a/packages/multicast_dns/pubspec.yaml b/packages/multicast_dns/pubspec.yaml
index 04ed3aa..39571ce 100644
--- a/packages/multicast_dns/pubspec.yaml
+++ b/packages/multicast_dns/pubspec.yaml
@@ -5,7 +5,7 @@
version: 0.3.2+2
environment:
- sdk: ">=2.14.0 <3.0.0"
+ sdk: ">=2.17.0 <3.0.0"
dependencies:
meta: ^1.3.0
diff --git a/packages/palette_generator/example/pubspec.yaml b/packages/palette_generator/example/pubspec.yaml
index b2b0cbd..22c12c0 100644
--- a/packages/palette_generator/example/pubspec.yaml
+++ b/packages/palette_generator/example/pubspec.yaml
@@ -5,6 +5,7 @@
environment:
sdk: ">=2.12.0 <3.0.0"
+ flutter: ">=3.0.0"
dependencies:
flutter:
diff --git a/packages/pigeon/mock_handler_tester/pubspec.yaml b/packages/pigeon/mock_handler_tester/pubspec.yaml
index 1826c25..7474ba3 100644
--- a/packages/pigeon/mock_handler_tester/pubspec.yaml
+++ b/packages/pigeon/mock_handler_tester/pubspec.yaml
@@ -5,6 +5,7 @@
environment:
sdk: ">=2.12.0 <3.0.0"
+ flutter: ">=3.0.0"
dependencies:
cupertino_icons: ^1.0.2
diff --git a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/pubspec.yaml b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/pubspec.yaml
index 191bc8a..a35a1dc 100644
--- a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/pubspec.yaml
+++ b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/pubspec.yaml
@@ -4,6 +4,7 @@
version: 1.0.0+1
environment:
sdk: ">=2.12.0 <3.0.0"
+ flutter: ">=3.0.0"
dependencies:
flutter:
diff --git a/packages/pigeon/platform_tests/ios_unit_tests/pubspec.yaml b/packages/pigeon/platform_tests/ios_unit_tests/pubspec.yaml
index c05bfcd..047e1c5 100644
--- a/packages/pigeon/platform_tests/ios_unit_tests/pubspec.yaml
+++ b/packages/pigeon/platform_tests/ios_unit_tests/pubspec.yaml
@@ -16,6 +16,7 @@
environment:
sdk: ">=2.12.0 <3.0.0"
+ flutter: ">=3.0.0"
dependencies:
cupertino_icons: ^1.0.5
diff --git a/packages/rfw/example/hello/pubspec.yaml b/packages/rfw/example/hello/pubspec.yaml
index 5bb2930..5998183 100644
--- a/packages/rfw/example/hello/pubspec.yaml
+++ b/packages/rfw/example/hello/pubspec.yaml
@@ -5,6 +5,7 @@
environment:
sdk: ">=2.13.0 <3.0.0"
+ flutter: ">=3.0.0"
dependencies:
flutter:
diff --git a/packages/rfw/example/local/pubspec.yaml b/packages/rfw/example/local/pubspec.yaml
index 1ee5e93..e09a659 100644
--- a/packages/rfw/example/local/pubspec.yaml
+++ b/packages/rfw/example/local/pubspec.yaml
@@ -5,6 +5,7 @@
environment:
sdk: ">=2.13.0 <3.0.0"
+ flutter: ">=3.0.0"
dependencies:
flutter:
diff --git a/packages/rfw/example/remote/pubspec.yaml b/packages/rfw/example/remote/pubspec.yaml
index 82f5890..e9ea76c 100644
--- a/packages/rfw/example/remote/pubspec.yaml
+++ b/packages/rfw/example/remote/pubspec.yaml
@@ -5,6 +5,7 @@
environment:
sdk: ">=2.13.0 <3.0.0"
+ flutter: ">=3.0.0"
dependencies:
flutter:
diff --git a/packages/rfw/example/wasm/pubspec.yaml b/packages/rfw/example/wasm/pubspec.yaml
index 5267a69..de28d1c 100644
--- a/packages/rfw/example/wasm/pubspec.yaml
+++ b/packages/rfw/example/wasm/pubspec.yaml
@@ -5,6 +5,7 @@
environment:
sdk: ">=2.13.0 <3.0.0"
+ flutter: ">=3.0.0"
dependencies:
flutter:
diff --git a/packages/rfw/test_coverage/pubspec.yaml b/packages/rfw/test_coverage/pubspec.yaml
index b61275b..46143d7 100644
--- a/packages/rfw/test_coverage/pubspec.yaml
+++ b/packages/rfw/test_coverage/pubspec.yaml
@@ -4,7 +4,7 @@
publish_to: none
environment:
- sdk: '>=2.14.0 <3.0.0'
+ sdk: '>=2.17.0 <3.0.0'
dependencies:
lcov_parser: 0.1.1
diff --git a/packages/xdg_directories/CHANGELOG.md b/packages/xdg_directories/CHANGELOG.md
index 7c97e6c..e0814fb 100644
--- a/packages/xdg_directories/CHANGELOG.md
+++ b/packages/xdg_directories/CHANGELOG.md
@@ -1,3 +1,7 @@
+## NEXT
+
+* Updates minimum SDK version to Flutter 3.0.
+
## 0.2.0+3
* Returns null instead of throwing exception from getUserDirectory when xdg-user-dir executable is missing.
diff --git a/packages/xdg_directories/pubspec.yaml b/packages/xdg_directories/pubspec.yaml
index 1103bec..3f3c4f9 100644
--- a/packages/xdg_directories/pubspec.yaml
+++ b/packages/xdg_directories/pubspec.yaml
@@ -5,7 +5,7 @@
version: 0.2.0+3
environment:
- sdk: ">=2.12.0 <3.0.0"
+ sdk: ">=2.17.0 <3.0.0"
platforms:
linux:
diff --git a/third_party/packages/cupertino_icons/CHANGELOG.md b/third_party/packages/cupertino_icons/CHANGELOG.md
index 4942540..3515eb3 100644
--- a/third_party/packages/cupertino_icons/CHANGELOG.md
+++ b/third_party/packages/cupertino_icons/CHANGELOG.md
@@ -1,3 +1,7 @@
+## NEXT
+
+* Updates minimum SDK version to Flutter 3.0.
+
## 1.0.5
* Updates README to reference correct URL.
diff --git a/third_party/packages/cupertino_icons/pubspec.yaml b/third_party/packages/cupertino_icons/pubspec.yaml
index a66ba87..8b683c2 100644
--- a/third_party/packages/cupertino_icons/pubspec.yaml
+++ b/third_party/packages/cupertino_icons/pubspec.yaml
@@ -6,7 +6,7 @@
version: 1.0.5
environment:
- sdk: ">=2.12.0 <3.0.0"
+ sdk: ">=2.17.0 <3.0.0"
flutter:
fonts: