[go: nahoru, domu]

Skip to content

Commit

Permalink
Bump lower Dart SDK constraints to 3.0 (flutter#40178)
Browse files Browse the repository at this point in the history
Bump lower Dart SDK constraints to 3.0
  • Loading branch information
goderbauer committed Mar 15, 2023
1 parent 3ed9f12 commit e143b30
Show file tree
Hide file tree
Showing 43 changed files with 69 additions and 96 deletions.
81 changes: 27 additions & 54 deletions ci/bin/format.dart
Original file line number Diff line number Diff line change
Expand Up @@ -304,19 +304,14 @@ abstract class FormatChecker {
/// Checks and formats C++/ObjC/Shader files using clang-format.
class ClangFormatChecker extends FormatChecker {
ClangFormatChecker({
ProcessManager processManager = const LocalProcessManager(),
required String baseGitRef,
required Directory repoDir,
super.processManager,
required super.baseGitRef,
required super.repoDir,
required Directory srcDir,
bool allFiles = false,
MessageCallback? messageCallback,
super.allFiles,
super.messageCallback,
}) : super(
processManager: processManager,
baseGitRef: baseGitRef,
repoDir: repoDir,
srcDir: srcDir,
allFiles: allFiles,
messageCallback: messageCallback,
) {
/*late*/ String clangOs;
if (Platform.isLinux) {
Expand Down Expand Up @@ -449,19 +444,14 @@ class ClangFormatChecker extends FormatChecker {
/// Checks the format of Java files uing the Google Java format checker.
class JavaFormatChecker extends FormatChecker {
JavaFormatChecker({
ProcessManager processManager = const LocalProcessManager(),
required String baseGitRef,
required Directory repoDir,
super.processManager,
required super.baseGitRef,
required super.repoDir,
required Directory srcDir,
bool allFiles = false,
MessageCallback? messageCallback,
super.allFiles,
super.messageCallback,
}) : super(
processManager: processManager,
baseGitRef: baseGitRef,
repoDir: repoDir,
srcDir: srcDir,
allFiles: allFiles,
messageCallback: messageCallback,
) {
googleJavaFormatJar = File(
path.absolute(
Expand Down Expand Up @@ -596,19 +586,14 @@ class JavaFormatChecker extends FormatChecker {
/// Checks the format of any BUILD.gn files using the "gn format" command.
class GnFormatChecker extends FormatChecker {
GnFormatChecker({
ProcessManager processManager = const LocalProcessManager(),
required String baseGitRef,
super.processManager,
required super.baseGitRef,
required Directory repoDir,
required Directory srcDir,
bool allFiles = false,
MessageCallback? messageCallback,
required super.srcDir,
super.allFiles,
super.messageCallback,
}) : super(
processManager: processManager,
baseGitRef: baseGitRef,
repoDir: repoDir,
srcDir: srcDir,
allFiles: allFiles,
messageCallback: messageCallback,
) {
gnBinary = File(
path.join(
Expand Down Expand Up @@ -687,19 +672,14 @@ class GnFormatChecker extends FormatChecker {
/// Checks the format of any .py files using the "yapf" command.
class PythonFormatChecker extends FormatChecker {
PythonFormatChecker({
ProcessManager processManager = const LocalProcessManager(),
required String baseGitRef,
super.processManager,
required super.baseGitRef,
required Directory repoDir,
required Directory srcDir,
bool allFiles = false,
MessageCallback? messageCallback,
required super.srcDir,
super.allFiles,
super.messageCallback,
}) : super(
processManager: processManager,
baseGitRef: baseGitRef,
repoDir: repoDir,
srcDir: srcDir,
allFiles: allFiles,
messageCallback: messageCallback,
) {
yapfBin = File(path.join(
repoDir.absolute.path,
Expand Down Expand Up @@ -787,20 +767,13 @@ class _GrepResult {
/// Checks for trailing whitspace in Dart files.
class WhitespaceFormatChecker extends FormatChecker {
WhitespaceFormatChecker({
ProcessManager processManager = const LocalProcessManager(),
required String baseGitRef,
required Directory repoDir,
required Directory srcDir,
bool allFiles = false,
MessageCallback? messageCallback,
}) : super(
processManager: processManager,
baseGitRef: baseGitRef,
repoDir: repoDir,
srcDir: srcDir,
allFiles: allFiles,
messageCallback: messageCallback,
);
super.processManager,
required super.baseGitRef,
required super.repoDir,
required super.srcDir,
super.allFiles,
super.messageCallback,
});

@override
Future<bool> checkFormatting() async {
Expand Down
2 changes: 1 addition & 1 deletion ci/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
name: ci_scripts
publish_to: none
environment:
sdk: '>=2.12.0-0 <3.0.0'
sdk: '>=3.0.0-0 <4.0.0'

# Do not add any dependencies that require more than what is provided in
# //third_party/pkg, //third_party/dart/pkg, or
Expand Down
2 changes: 1 addition & 1 deletion flutter_frontend_server/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ homepage: https://flutter.dev
# relative to this directory into //third_party/dart

environment:
sdk: ">=2.12.0 <3.0.0"
sdk: '>=3.0.0-0 <4.0.0'

dependencies:
args: any
Expand Down
2 changes: 1 addition & 1 deletion impeller/tessellator/dart/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ publish_to: none
homepage: https://github.com/flutter/impeller/tree/main/tessellator/dart

environment:
sdk: '>=2.12.0 <3.0.0'
sdk: '>=3.0.0-0 <4.0.0'
2 changes: 1 addition & 1 deletion lib/snapshot/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# This file is needed by Fuchsia's dart_library template.

environment:
sdk: '>=2.12.0 <3.0.0'
sdk: '>=3.0.0-0 <4.0.0'
2 changes: 1 addition & 1 deletion lib/web_ui/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ publish_to: none

# Keep the SDK version range in sync with pubspecs under web_sdk
environment:
sdk: ">=2.19.0 <3.0.0"
sdk: '>=2.19.0 <4.0.0'

dependencies:
js: 0.6.4
Expand Down
2 changes: 1 addition & 1 deletion shell/platform/fuchsia/dart-pkg/fuchsia/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
# found in the LICENSE file.

environment:
sdk: '>=2.12.0 <3.0.0'
sdk: '>=3.0.0-0 <4.0.0'
2 changes: 1 addition & 1 deletion shell/platform/fuchsia/dart-pkg/zircon/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
name: zircon

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


# Uncomment block for local testing
Expand Down
2 changes: 1 addition & 1 deletion shell/platform/fuchsia/dart-pkg/zircon_ffi/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: zircon_ffi

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

dependencies:
ffi: ^1.0.0
Expand Down
2 changes: 1 addition & 1 deletion shell/platform/fuchsia/dart_runner/embedder/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
# template in BUILD.gn.

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

2 changes: 1 addition & 1 deletion shell/platform/fuchsia/dart_runner/vmservice/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
# found in the LICENSE file.

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

2 changes: 1 addition & 1 deletion shell/platform/fuchsia/flutter/kernel/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
# found in the LICENSE file.

environment:
sdk: '>=2.12.0 <3.0.0'
sdk: '>=3.0.0-0 <4.0.0'
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
name: child_view2

environment:
sdk: '>=2.12.0 <3.0.0'
sdk: '>=3.0.0-0 <4.0.0'
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
name: parent-view2

environment:
sdk: '>=2.18.0 <3.0.0'
sdk: '>=3.0.0-0 <4.0.0'
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
name: mouse-input-view

environment:
sdk: '>=2.18.0 <3.0.0'
sdk: '>=3.0.0-0 <4.0.0'
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
name: text-input-view

environment:
sdk: '>=2.18.0 <3.0.0'
sdk: '>=3.0.0-0 <4.0.0'
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
name: embedding-flutter-view

environment:
sdk: '>=2.18.0 <3.0.0'
sdk: '>=3.0.0-0 <4.0.0'
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
name: touch-input-view

environment:
sdk: '>=2.18.0 <3.0.0'
sdk: '>=3.0.0-0 <4.0.0'
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

name: profiler_symbols
environment:
sdk: '>=2.12.0 <3.0.0'
sdk: '>=3.0.0-0 <4.0.0'
version: 0
description: Extracts a minimal symbols table for the Dart VM profiler
author: Dart Team <misc@dartlang.org>
2 changes: 1 addition & 1 deletion shell/vmservice/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
name: vmservice_snapshot
publish_to: none
environment:
sdk: '>=2.12.0 <3.0.0'
sdk: '>=3.0.0-0 <4.0.0'
2 changes: 1 addition & 1 deletion sky/packages/sky_engine/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ description: Dart SDK extensions for dart:ui
homepage: http://flutter.io
# sky_engine requires sdk_ext support in the analyzer which was added in 1.11.x
environment:
sdk: ">=2.12.0-0 <3.0.0"
sdk: '>=3.0.0-0 <4.0.0'
2 changes: 1 addition & 1 deletion testing/android_background_image/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
name: android_background_image
publish_to: none
environment:
sdk: '>=2.12.0 <3.0.0'
sdk: '>=3.0.0-0 <4.0.0'

# Do not add any dependencies that require more than what is provided in
# //third_party/dart/pkg, //third_party/dart/third_party/pkg, or
Expand Down
2 changes: 1 addition & 1 deletion testing/benchmark/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
name: flutter_engine_benchmark
publish_to: none
environment:
sdk: '>=2.12.0-0 <3.0.0'
sdk: '>=3.0.0-0 <4.0.0'

# Do not add any dependencies that require more than what is provided in
# //third_party/pkg, //third_party/dart/pkg, or
Expand Down
2 changes: 1 addition & 1 deletion testing/dart/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ publish_to: none
# relative to this directory into //third_party/dart

environment:
sdk: '>=2.17.0 <3.0.0'
sdk: '>=3.0.0-0 <4.0.0'

dependencies:
litetest: any
Expand Down
2 changes: 1 addition & 1 deletion testing/litetest/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ publish_to: none
# relative to this directory into //third_party/dart

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

dependencies:
async_helper: any
Expand Down
2 changes: 1 addition & 1 deletion testing/scenario_app/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
name: scenario_app
publish_to: none
environment:
sdk: '>=2.17.0 <3.0.0'
sdk: '>=3.0.0-0 <4.0.0'

# Do not add any dependencies that require more than what is provided in
# //third_party/dart/pkg, //third_party/dart/third_party/pkg, or
Expand Down
2 changes: 1 addition & 1 deletion testing/skia_gold_client/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
name: skia_gold_client
publish_to: none
environment:
sdk: '>=2.12.0 <3.0.0'
sdk: '>=3.0.0-0 <4.0.0'

# Do not add any dependencies that require more than what is provided in
# //third_party/dart/pkg, //third_party/dart/third_party/pkg, or
Expand Down
2 changes: 1 addition & 1 deletion testing/smoke_test_failure/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
name: smoke_test_failure
publish_to: none
environment:
sdk: '>=2.12.0 <3.0.0'
sdk: '>=3.0.0-0 <4.0.0'

# Do not add any dependencies that require more than what is provided in
# //third_party/dart/pkg or //third_party/dart/third_party/pkg.
Expand Down
2 changes: 1 addition & 1 deletion testing/symbols/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
name: verify_exported
publish_to: none
environment:
sdk: '>=2.12.0 <3.0.0'
sdk: '>=3.0.0-0 <4.0.0'

# Do not add any dependencies that require more than what is provided in
# //third_party/pkg, //third_party/dart/pkg, or
Expand Down
2 changes: 1 addition & 1 deletion third_party/web_locale_keymap/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: web_locale_keymap
publish_to: none

environment:
sdk: ">=2.12.0 <3.0.0"
sdk: '>=3.0.0-0 <4.0.0'

dev_dependencies:
test: ^1.21.7
2 changes: 1 addition & 1 deletion third_party/web_test_fonts/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: web_test_fonts
publish_to: none

environment:
sdk: ">=2.12.0-0 <3.0.0"
sdk: '>=3.0.0-0 <4.0.0'

dev_dependencies:
args: any
Expand Down
2 changes: 1 addition & 1 deletion third_party/web_unicode/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: web_unicode
publish_to: none

environment:
sdk: ">=2.12.0-0 <3.0.0"
sdk: '>=3.0.0-0 <4.0.0'

dev_dependencies:
args: any
Expand Down
2 changes: 1 addition & 1 deletion tools/android_lint/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

name: android_lint
environment:
sdk: '>=2.12.0 <3.0.0'
sdk: '>=3.0.0-0 <4.0.0'

# Do not add any dependencies that require more than what is provided in
# //third_party.pkg, //third_party/dart/pkg, or
Expand Down
2 changes: 1 addition & 1 deletion tools/api_check/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ publish_to: none
# relative to this directory into //third_party/dart

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

# Do not add any dependencies that require more than what is provided in
# //third_party/pkg, //third_party/dart/pkg, or
Expand Down
2 changes: 1 addition & 1 deletion tools/clang_tidy/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
name: clang_tidy
publish_to: none
environment:
sdk: '>=2.12.0-0 <3.0.0'
sdk: '>=3.0.0-0 <4.0.0'

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

0 comments on commit e143b30

Please sign in to comment.