Skip to content

Commit 5177251

Browse files
authored
Revert "Bump lower Dart SDK constraints to 3.0 (flutter#40178)" (flutter#40317)
Revert "Bump lower Dart SDK constraints to 3.0"
1 parent ec151bf commit 5177251

File tree

43 files changed

+96
-69
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+96
-69
lines changed

ci/bin/format.dart

+54-27
Original file line numberDiff line numberDiff line change
@@ -304,14 +304,19 @@ abstract class FormatChecker {
304304
/// Checks and formats C++/ObjC/Shader files using clang-format.
305305
class ClangFormatChecker extends FormatChecker {
306306
ClangFormatChecker({
307-
super.processManager,
308-
required super.baseGitRef,
309-
required super.repoDir,
307+
ProcessManager processManager = const LocalProcessManager(),
308+
required String baseGitRef,
309+
required Directory repoDir,
310310
required Directory srcDir,
311-
super.allFiles,
312-
super.messageCallback,
311+
bool allFiles = false,
312+
MessageCallback? messageCallback,
313313
}) : super(
314+
processManager: processManager,
315+
baseGitRef: baseGitRef,
316+
repoDir: repoDir,
314317
srcDir: srcDir,
318+
allFiles: allFiles,
319+
messageCallback: messageCallback,
315320
) {
316321
/*late*/ String clangOs;
317322
if (Platform.isLinux) {
@@ -444,14 +449,19 @@ class ClangFormatChecker extends FormatChecker {
444449
/// Checks the format of Java files uing the Google Java format checker.
445450
class JavaFormatChecker extends FormatChecker {
446451
JavaFormatChecker({
447-
super.processManager,
448-
required super.baseGitRef,
449-
required super.repoDir,
452+
ProcessManager processManager = const LocalProcessManager(),
453+
required String baseGitRef,
454+
required Directory repoDir,
450455
required Directory srcDir,
451-
super.allFiles,
452-
super.messageCallback,
456+
bool allFiles = false,
457+
MessageCallback? messageCallback,
453458
}) : super(
459+
processManager: processManager,
460+
baseGitRef: baseGitRef,
461+
repoDir: repoDir,
454462
srcDir: srcDir,
463+
allFiles: allFiles,
464+
messageCallback: messageCallback,
455465
) {
456466
googleJavaFormatJar = File(
457467
path.absolute(
@@ -586,14 +596,19 @@ class JavaFormatChecker extends FormatChecker {
586596
/// Checks the format of any BUILD.gn files using the "gn format" command.
587597
class GnFormatChecker extends FormatChecker {
588598
GnFormatChecker({
589-
super.processManager,
590-
required super.baseGitRef,
599+
ProcessManager processManager = const LocalProcessManager(),
600+
required String baseGitRef,
591601
required Directory repoDir,
592-
required super.srcDir,
593-
super.allFiles,
594-
super.messageCallback,
602+
required Directory srcDir,
603+
bool allFiles = false,
604+
MessageCallback? messageCallback,
595605
}) : super(
606+
processManager: processManager,
607+
baseGitRef: baseGitRef,
596608
repoDir: repoDir,
609+
srcDir: srcDir,
610+
allFiles: allFiles,
611+
messageCallback: messageCallback,
597612
) {
598613
gnBinary = File(
599614
path.join(
@@ -672,14 +687,19 @@ class GnFormatChecker extends FormatChecker {
672687
/// Checks the format of any .py files using the "yapf" command.
673688
class PythonFormatChecker extends FormatChecker {
674689
PythonFormatChecker({
675-
super.processManager,
676-
required super.baseGitRef,
690+
ProcessManager processManager = const LocalProcessManager(),
691+
required String baseGitRef,
677692
required Directory repoDir,
678-
required super.srcDir,
679-
super.allFiles,
680-
super.messageCallback,
693+
required Directory srcDir,
694+
bool allFiles = false,
695+
MessageCallback? messageCallback,
681696
}) : super(
697+
processManager: processManager,
698+
baseGitRef: baseGitRef,
682699
repoDir: repoDir,
700+
srcDir: srcDir,
701+
allFiles: allFiles,
702+
messageCallback: messageCallback,
683703
) {
684704
yapfBin = File(path.join(
685705
repoDir.absolute.path,
@@ -767,13 +787,20 @@ class _GrepResult {
767787
/// Checks for trailing whitspace in Dart files.
768788
class WhitespaceFormatChecker extends FormatChecker {
769789
WhitespaceFormatChecker({
770-
super.processManager,
771-
required super.baseGitRef,
772-
required super.repoDir,
773-
required super.srcDir,
774-
super.allFiles,
775-
super.messageCallback,
776-
});
790+
ProcessManager processManager = const LocalProcessManager(),
791+
required String baseGitRef,
792+
required Directory repoDir,
793+
required Directory srcDir,
794+
bool allFiles = false,
795+
MessageCallback? messageCallback,
796+
}) : super(
797+
processManager: processManager,
798+
baseGitRef: baseGitRef,
799+
repoDir: repoDir,
800+
srcDir: srcDir,
801+
allFiles: allFiles,
802+
messageCallback: messageCallback,
803+
);
777804

778805
@override
779806
Future<bool> checkFormatting() async {

ci/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
name: ci_scripts
66
publish_to: none
77
environment:
8-
sdk: '>=3.0.0-0 <4.0.0'
8+
sdk: '>=2.12.0-0 <3.0.0'
99

1010
# Do not add any dependencies that require more than what is provided in
1111
# //third_party/pkg, //third_party/dart/pkg, or

flutter_frontend_server/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ homepage: https://flutter.dev
1818
# relative to this directory into //third_party/dart
1919

2020
environment:
21-
sdk: '>=3.0.0-0 <4.0.0'
21+
sdk: ">=2.12.0 <3.0.0"
2222

2323
dependencies:
2424
args: any

impeller/tessellator/dart/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ publish_to: none
88
homepage: https://github.com/flutter/impeller/tree/main/tessellator/dart
99

1010
environment:
11-
sdk: '>=3.0.0-0 <4.0.0'
11+
sdk: '>=2.12.0 <3.0.0'

lib/snapshot/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
# This file is needed by Fuchsia's dart_library template.
66

77
environment:
8-
sdk: '>=3.0.0-0 <4.0.0'
8+
sdk: '>=2.12.0 <3.0.0'

lib/web_ui/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ publish_to: none
33

44
# Keep the SDK version range in sync with pubspecs under web_sdk
55
environment:
6-
sdk: '>=2.19.0 <4.0.0'
6+
sdk: ">=2.19.0 <3.0.0"
77

88
dependencies:
99
js: 0.6.4

shell/platform/fuchsia/dart-pkg/fuchsia/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
# found in the LICENSE file.
44

55
environment:
6-
sdk: '>=3.0.0-0 <4.0.0'
6+
sdk: '>=2.12.0 <3.0.0'

shell/platform/fuchsia/dart-pkg/zircon/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
name: zircon
66

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

1010

1111
# Uncomment block for local testing

shell/platform/fuchsia/dart-pkg/zircon_ffi/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: zircon_ffi
22

33
environment:
4-
sdk: '>=3.0.0-0 <4.0.0'
4+
sdk: '>=2.12.0 <3.0.0'
55

66
dependencies:
77
ffi: ^1.0.0

shell/platform/fuchsia/dart_runner/embedder/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
# template in BUILD.gn.
77

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

shell/platform/fuchsia/dart_runner/vmservice/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
# found in the LICENSE file.
44

55
environment:
6-
sdk: '>=3.0.0-0 <4.0.0'
6+
sdk: '>=2.12.0 <3.0.0'
77

shell/platform/fuchsia/flutter/kernel/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
# found in the LICENSE file.
44

55
environment:
6-
sdk: '>=3.0.0-0 <4.0.0'
6+
sdk: '>=2.12.0 <3.0.0'

shell/platform/fuchsia/flutter/tests/integration/embedder/child-view/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
name: child_view2
66

77
environment:
8-
sdk: '>=3.0.0-0 <4.0.0'
8+
sdk: '>=2.12.0 <3.0.0'

shell/platform/fuchsia/flutter/tests/integration/embedder/parent-view/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
name: parent-view2
66

77
environment:
8-
sdk: '>=3.0.0-0 <4.0.0'
8+
sdk: '>=2.18.0 <3.0.0'

shell/platform/fuchsia/flutter/tests/integration/mouse-input/mouse-input-view/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
name: mouse-input-view
66

77
environment:
8-
sdk: '>=3.0.0-0 <4.0.0'
8+
sdk: '>=2.18.0 <3.0.0'

shell/platform/fuchsia/flutter/tests/integration/text-input/text-input-view/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
name: text-input-view
66

77
environment:
8-
sdk: '>=3.0.0-0 <4.0.0'
8+
sdk: '>=2.18.0 <3.0.0'

shell/platform/fuchsia/flutter/tests/integration/touch-input/embedding-flutter-view/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
name: embedding-flutter-view
66

77
environment:
8-
sdk: '>=3.0.0-0 <4.0.0'
8+
sdk: '>=2.18.0 <3.0.0'

shell/platform/fuchsia/flutter/tests/integration/touch-input/touch-input-view/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
name: touch-input-view
66

77
environment:
8-
sdk: '>=3.0.0-0 <4.0.0'
8+
sdk: '>=2.18.0 <3.0.0'

shell/platform/fuchsia/runtime/dart/profiler_symbols/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
name: profiler_symbols
66
environment:
7-
sdk: '>=3.0.0-0 <4.0.0'
7+
sdk: '>=2.12.0 <3.0.0'
88
version: 0
99
description: Extracts a minimal symbols table for the Dart VM profiler
1010
author: Dart Team <[email protected]>

shell/vmservice/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
name: vmservice_snapshot
66
publish_to: none
77
environment:
8-
sdk: '>=3.0.0-0 <4.0.0'
8+
sdk: '>=2.12.0 <3.0.0'

sky/packages/sky_engine/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ description: Dart SDK extensions for dart:ui
55
homepage: http://flutter.io
66
# sky_engine requires sdk_ext support in the analyzer which was added in 1.11.x
77
environment:
8-
sdk: '>=3.0.0-0 <4.0.0'
8+
sdk: ">=2.12.0-0 <3.0.0"

testing/android_background_image/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
name: android_background_image
66
publish_to: none
77
environment:
8-
sdk: '>=3.0.0-0 <4.0.0'
8+
sdk: '>=2.12.0 <3.0.0'
99

1010
# Do not add any dependencies that require more than what is provided in
1111
# //third_party/dart/pkg, //third_party/dart/third_party/pkg, or

testing/benchmark/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
name: flutter_engine_benchmark
66
publish_to: none
77
environment:
8-
sdk: '>=3.0.0-0 <4.0.0'
8+
sdk: '>=2.12.0-0 <3.0.0'
99

1010
# Do not add any dependencies that require more than what is provided in
1111
# //third_party/pkg, //third_party/dart/pkg, or

testing/dart/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ publish_to: none
1414
# relative to this directory into //third_party/dart
1515

1616
environment:
17-
sdk: '>=3.0.0-0 <4.0.0'
17+
sdk: '>=2.17.0 <3.0.0'
1818

1919
dependencies:
2020
litetest: any

testing/litetest/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ publish_to: none
1414
# relative to this directory into //third_party/dart
1515

1616
environment:
17-
sdk: '>=3.0.0-0 <4.0.0'
17+
sdk: '>=2.12.0 <3.0.0'
1818

1919
dependencies:
2020
async_helper: any

testing/scenario_app/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
name: scenario_app
66
publish_to: none
77
environment:
8-
sdk: '>=3.0.0-0 <4.0.0'
8+
sdk: '>=2.17.0 <3.0.0'
99

1010
# Do not add any dependencies that require more than what is provided in
1111
# //third_party/dart/pkg, //third_party/dart/third_party/pkg, or

testing/skia_gold_client/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
name: skia_gold_client
66
publish_to: none
77
environment:
8-
sdk: '>=3.0.0-0 <4.0.0'
8+
sdk: '>=2.12.0 <3.0.0'
99

1010
# Do not add any dependencies that require more than what is provided in
1111
# //third_party/dart/pkg, //third_party/dart/third_party/pkg, or

testing/smoke_test_failure/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
name: smoke_test_failure
66
publish_to: none
77
environment:
8-
sdk: '>=3.0.0-0 <4.0.0'
8+
sdk: '>=2.12.0 <3.0.0'
99

1010
# Do not add any dependencies that require more than what is provided in
1111
# //third_party/dart/pkg or //third_party/dart/third_party/pkg.

testing/symbols/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
name: verify_exported
66
publish_to: none
77
environment:
8-
sdk: '>=3.0.0-0 <4.0.0'
8+
sdk: '>=2.12.0 <3.0.0'
99

1010
# Do not add any dependencies that require more than what is provided in
1111
# //third_party/pkg, //third_party/dart/pkg, or

third_party/web_locale_keymap/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: web_locale_keymap
33
publish_to: none
44

55
environment:
6-
sdk: '>=3.0.0-0 <4.0.0'
6+
sdk: ">=2.12.0 <3.0.0"
77

88
dev_dependencies:
99
test: ^1.21.7

third_party/web_test_fonts/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: web_test_fonts
33
publish_to: none
44

55
environment:
6-
sdk: '>=3.0.0-0 <4.0.0'
6+
sdk: ">=2.12.0-0 <3.0.0"
77

88
dev_dependencies:
99
args: any

third_party/web_unicode/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: web_unicode
33
publish_to: none
44

55
environment:
6-
sdk: '>=3.0.0-0 <4.0.0'
6+
sdk: ">=2.12.0-0 <3.0.0"
77

88
dev_dependencies:
99
args: any

tools/android_lint/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
name: android_lint
66
environment:
7-
sdk: '>=3.0.0-0 <4.0.0'
7+
sdk: '>=2.12.0 <3.0.0'
88

99
# Do not add any dependencies that require more than what is provided in
1010
# //third_party.pkg, //third_party/dart/pkg, or

tools/api_check/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ publish_to: none
1414
# relative to this directory into //third_party/dart
1515

1616
environment:
17-
sdk: '>=3.0.0-0 <4.0.0'
17+
sdk: '>=2.12.0 <3.0.0'
1818

1919
# Do not add any dependencies that require more than what is provided in
2020
# //third_party/pkg, //third_party/dart/pkg, or

tools/clang_tidy/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
name: clang_tidy
66
publish_to: none
77
environment:
8-
sdk: '>=3.0.0-0 <4.0.0'
8+
sdk: '>=2.12.0-0 <3.0.0'
99

1010
# Do not add any dependencies that require more than what is provided in
1111
# //third_party/pkg, //third_party/dart/pkg, or

0 commit comments

Comments
 (0)