Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit af065a6

Browse files
[tool/ci] Add minimum supported SDK validation (#7028)
Adds options to `pubspec.yaml` to check that the minimum supported SDK range for Flutter/Dart is at least a given version, to add CI enforcement that we're updating all of our support claims when we update our tested versions (rather than it being something we have to remember to do), and enables it in CI. As part of enabling it, fixes some violations: - path_provider_foundation had been temporarily dropped back to 2.10 as part of pushing out a regression fix. - a number of examples were missing Flutter constraints even though they used Flutter. - the non-Flutter `plugin_platform_interface` package hadn't been update since I hadn't thought about Dart-only constraints in the past.
1 parent e9406bc commit af065a6

File tree

16 files changed

+270
-12
lines changed

16 files changed

+270
-12
lines changed

.cirrus.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,9 @@ task:
101101
always:
102102
format_script: ./script/tool_runner.sh format --fail-on-change
103103
license_script: $PLUGIN_TOOL_COMMAND license-check
104-
pubspec_script: ./script/tool_runner.sh pubspec-check
104+
# The major and minor versions here should match the lowest version
105+
# analyzed in legacy_version_analyze.
106+
pubspec_script: ./script/tool_runner.sh pubspec-check --min-min-flutter-version=3.0.0 --min-min-dart-version=2.17.0
105107
readme_script:
106108
- ./script/tool_runner.sh readme-check
107109
# Re-run with --require-excerpts, skipping packages that still need
@@ -171,6 +173,7 @@ task:
171173
- name: legacy_version_analyze
172174
depends_on: analyze
173175
matrix:
176+
# Change the arguments to pubspec-check when changing these values.
174177
env:
175178
CHANNEL: "3.0.5"
176179
DART_VERSION: "2.17.6"

packages/file_selector/file_selector/example/pubspec.yaml

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

77
environment:
88
sdk: ">=2.12.0 <3.0.0"
9+
flutter: ">=3.0.0"
910

1011
dependencies:
1112
file_selector:

packages/file_selector/file_selector_ios/example/pubspec.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ version: 1.0.0
55

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

910
dependencies:
1011
# The following adds the Cupertino Icons font to your application.
@@ -28,4 +29,4 @@ dev_dependencies:
2829
sdk: flutter
2930

3031
flutter:
31-
uses-material-design: true
32+
uses-material-design: true

packages/file_selector/file_selector_linux/example/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
file_selector_linux:

packages/flutter_plugin_android_lifecycle/example/pubspec.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ publish_to: none
44

55
environment:
66
sdk: ">=2.12.0 <3.0.0"
7+
flutter: ">=3.0.0"
78

89
dependencies:
910
flutter:

packages/path_provider/path_provider_foundation/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 supported Flutter version to 3.0.
4+
15
## 2.1.1
26

37
* Fixes a regression in the path retured by `getApplicationSupportDirectory` on iOS.

packages/path_provider/path_provider_foundation/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ version: 2.1.1
66

77
environment:
88
sdk: ">=2.12.0 <3.0.0"
9-
flutter: ">=2.10.0"
9+
flutter: ">=3.0.0"
1010

1111
flutter:
1212
plugin:

packages/plugin_platform_interface/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 supported Dart version.
4+
15
## 2.1.3
26

37
* Minor fixes for new analysis options.

packages/plugin_platform_interface/pubspec.yaml

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

2020
environment:
21-
sdk: ">=2.12.0 <3.0.0"
21+
sdk: ">=2.17.0 <3.0.0"
2222

2323
dependencies:
2424
meta: ^1.3.0

packages/webview_flutter/webview_flutter_android/example/pubspec.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ publish_to: none
44

55
environment:
66
sdk: ">=2.14.0 <3.0.0"
7+
flutter: ">=3.0.0"
78

89
dependencies:
910
flutter:

0 commit comments

Comments
 (0)