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

0 commit comments

Comments
 (0)