Skip to content

Commit b1a7162

Browse files
[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
1 parent f324abb commit b1a7162

File tree

31 files changed

+53
-15
lines changed

31 files changed

+53
-15
lines changed

.ci/scripts/prepare_tool.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ git fetch origin main
88

99
# Pinned version of the plugin tools, to avoid breakage in this repository
1010
# when pushing updates from flutter/plugins.
11-
dart pub global activate flutter_plugin_tools 0.13.2
11+
dart pub global activate flutter_plugin_tools 0.13.4

.cirrus.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,9 @@ task:
9999
always:
100100
format_script: ./script/tool_runner.sh format --fail-on-change
101101
license_script: $PLUGIN_TOOL_COMMAND license-check
102-
pubspec_script: ./script/tool_runner.sh pubspec-check
102+
# The major and minor versions here should match the lowest version
103+
# analyzed in legacy_version_analyze.
104+
pubspec_script: ./script/tool_runner.sh pubspec-check --min-min-flutter-version=3.0.0 --min-min-dart-version=2.17.0
103105
readme_script:
104106
- ./script/tool_runner.sh readme-check
105107
# Re-run with --require-excerpts, skipping packages that still need
@@ -157,6 +159,7 @@ task:
157159
- name: legacy_version_analyze
158160
depends_on: analyze
159161
matrix:
162+
# Change the arguments to pubspec-check when changing these values.
160163
env:
161164
CHANNEL: "3.0.5"
162165
DART_VERSION: "2.17.6"

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
with:
3232
fetch-depth: 0 # Fetch all history so the tool can get all the tags to determine version.
3333
- name: Set up tools
34-
run: dart pub global activate flutter_plugin_tools 0.13.2
34+
run: dart pub global activate flutter_plugin_tools 0.13.4
3535

3636
# # This workflow should be the last to run. So wait for all the other tests to succeed.
3737
- name: Wait on all tests

packages/animations/example/pubspec.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ version: 0.0.1
77

88
environment:
99
sdk: ">=2.12.0 <3.0.0"
10+
flutter: ">=3.0.0"
1011

1112
dependencies:
1213
animations:

packages/cross_file/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## NEXT
2+
3+
* Updates minimum SDK version to Flutter 3.0.
4+
15
## 0.3.3+2
26

37
* Fixes lint warnings in tests.

packages/cross_file/lib/src/types/html.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ class XFile extends XFileBase {
2626
///
2727
/// `name` needs to be passed from the outside, since it's only available
2828
/// while handling [html.File]s (when the ObjectUrl is created).
29+
// ignore: use_super_parameters
2930
XFile(
3031
String path, {
3132
String? mimeType,

packages/cross_file/lib/src/types/interface.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ class XFile extends XFileBase {
2222
/// `path` of the file doesn't match what the user sees when selecting it
2323
/// (like in web)
2424
XFile(
25-
String path, {
25+
super.path, {
2626
String? mimeType,
2727
String? name,
2828
int? length,
2929
Uint8List? bytes,
3030
DateTime? lastModified,
3131
@visibleForTesting CrossFileTestOverrides? overrides,
32-
}) : super(path) {
32+
}) {
3333
throw UnimplementedError(
3434
'CrossFile is not available in your current platform.');
3535
}

packages/cross_file/lib/src/types/io.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ class XFile extends XFileBase {
1717
/// [bytes] is ignored; the parameter exists only to match the web version of
1818
/// the constructor. To construct a dart:io XFile from bytes, use
1919
/// [XFile.fromData].
20+
// ignore: use_super_parameters
2021
XFile(
2122
String path, {
2223
String? mimeType,

packages/cross_file/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+
55
version: 0.3.3+2
66

77
environment:
8-
sdk: ">=2.12.0 <3.0.0"
8+
sdk: ">=2.17.0 <3.0.0"
99

1010
dependencies:
1111
js: ^0.6.3

packages/cross_file/test/x_file_io_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ void main() {
109109

110110
/// An XFile subclass that tracks reads, for testing purposes.
111111
class TestXFile extends XFile {
112-
TestXFile(String path) : super(path);
112+
TestXFile(super.path);
113113

114114
bool hasBeenRead = false;
115115

packages/flutter_lints/example/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: A project that showcases how to enable the recommended lints for Fl
44
publish_to: none
55

66
environment:
7-
sdk: '>=2.12.0 <3.0.0'
7+
sdk: '>=2.17.0 <3.0.0'
88

99
# Add the latest version of `package:flutter_lints` as a dev_dependency. The
1010
# lint set provided by this package is activated in the `analysis_options.yaml`

packages/flutter_lints/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+
55
version: 2.0.1
66

77
environment:
8-
sdk: '>=2.17.0-0 <3.0.0'
8+
sdk: '>=2.17.0 <3.0.0'
99

1010
dependencies:
1111
lints: ^2.0.0

packages/flutter_template_images/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## NEXT
2+
3+
* Updates minimum SDK version to Flutter 3.0.
4+
15
## 4.2.0
26

37
* Adds iOS template app icons, updated to square icons with no transparency.

packages/flutter_template_images/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+
55
version: 4.2.0
66

77
environment:
8-
sdk: ">=2.12.0 <3.0.0"
8+
sdk: ">=2.17.0 <3.0.0"

packages/metrics_center/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## NEXT
2+
3+
* Updates minimum SDK version to Flutter 3.0.
4+
15
## 1.0.6
26

37
- Fixes lint warnings.

packages/metrics_center/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ repository: https://github.com/flutter/packages/tree/main/packages/metrics_cente
66
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+metrics_center%22
77

88
environment:
9-
sdk: '>=2.12.0 <3.0.0'
9+
sdk: '>=2.17.0 <3.0.0'
1010

1111
dependencies:
1212
crypto: ^3.0.1

packages/multicast_dns/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## NEXT
2+
3+
* Updates minimum SDK version to Flutter 3.0.
4+
15
## 0.3.2+2
26

37
* Fixes lints warnings.

packages/multicast_dns/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+
55
version: 0.3.2+2
66

77
environment:
8-
sdk: ">=2.14.0 <3.0.0"
8+
sdk: ">=2.17.0 <3.0.0"
99

1010
dependencies:
1111
meta: ^1.3.0

packages/palette_generator/example/pubspec.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ version: 0.1.0
55

66
environment:
77
sdk: ">=2.12.0 <3.0.0"
8+
flutter: ">=3.0.0"
89

910
dependencies:
1011
flutter:

packages/pigeon/mock_handler_tester/pubspec.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ version: 1.0.0+1
55

66
environment:
77
sdk: ">=2.12.0 <3.0.0"
8+
flutter: ">=3.0.0"
89

910
dependencies:
1011
cupertino_icons: ^1.0.2

packages/pigeon/platform_tests/flutter_null_safe_unit_tests/pubspec.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ publish_to: none # Remove this line if you wish to publish to pub.dev
44
version: 1.0.0+1
55
environment:
66
sdk: ">=2.12.0 <3.0.0"
7+
flutter: ">=3.0.0"
78

89
dependencies:
910
flutter:

packages/pigeon/platform_tests/ios_unit_tests/pubspec.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ version: 1.0.0+1
1616

1717
environment:
1818
sdk: ">=2.12.0 <3.0.0"
19+
flutter: ">=3.0.0"
1920

2021
dependencies:
2122
cupertino_icons: ^1.0.5

packages/rfw/example/hello/pubspec.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ version: 1.0.0+1
55

66
environment:
77
sdk: ">=2.13.0 <3.0.0"
8+
flutter: ">=3.0.0"
89

910
dependencies:
1011
flutter:

packages/rfw/example/local/pubspec.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ version: 1.0.0+1
55

66
environment:
77
sdk: ">=2.13.0 <3.0.0"
8+
flutter: ">=3.0.0"
89

910
dependencies:
1011
flutter:

packages/rfw/example/remote/pubspec.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ version: 1.0.0+1
55

66
environment:
77
sdk: ">=2.13.0 <3.0.0"
8+
flutter: ">=3.0.0"
89

910
dependencies:
1011
flutter:

packages/rfw/example/wasm/pubspec.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ version: 1.0.0+1
55

66
environment:
77
sdk: ">=2.13.0 <3.0.0"
8+
flutter: ">=3.0.0"
89

910
dependencies:
1011
flutter:

packages/rfw/test_coverage/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version: 1.0.0
44
publish_to: none
55

66
environment:
7-
sdk: '>=2.14.0 <3.0.0'
7+
sdk: '>=2.17.0 <3.0.0'
88

99
dependencies:
1010
lcov_parser: 0.1.1

packages/xdg_directories/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## NEXT
2+
3+
* Updates minimum SDK version to Flutter 3.0.
4+
15
## 0.2.0+3
26

37
* Returns null instead of throwing exception from getUserDirectory when xdg-user-dir executable is missing.

packages/xdg_directories/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+
55
version: 0.2.0+3
66

77
environment:
8-
sdk: ">=2.12.0 <3.0.0"
8+
sdk: ">=2.17.0 <3.0.0"
99

1010
platforms:
1111
linux:

third_party/packages/cupertino_icons/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## NEXT
2+
3+
* Updates minimum SDK version to Flutter 3.0.
4+
15
## 1.0.5
26

37
* Updates README to reference correct URL.

third_party/packages/cupertino_icons/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+
66
version: 1.0.5
77

88
environment:
9-
sdk: ">=2.12.0 <3.0.0"
9+
sdk: ">=2.17.0 <3.0.0"
1010

1111
flutter:
1212
fonts:

0 commit comments

Comments
 (0)