diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 35af1671df..da4811ab32 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -1,4 +1,4 @@ -# Created with package:mono_repo v6.6.0 +# Created with package:mono_repo v6.6.1 name: Dart CI on: push: @@ -36,50 +36,20 @@ jobs: name: Checkout repository uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - name: mono_repo self validate - run: dart pub global activate mono_repo 6.6.0 + run: dart pub global activate mono_repo 6.6.1 - name: mono_repo self validate run: dart pub global run mono_repo generate --validate job_002: - name: "analyze_and_format; linux; Dart 2.19.0; PKG: pkgs/http_client_conformance_tests; `dart analyze --fatal-infos`" + name: "analyze_and_format; linux; Dart 3.0.0; PKGS: pkgs/http, pkgs/http_client_conformance_tests, pkgs/http_profile; `dart analyze --fatal-infos`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:2.19.0;packages:pkgs/http_client_conformance_tests;commands:analyze_1" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/http-pkgs/http_client_conformance_tests-pkgs/http_profile;commands:analyze_1" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:2.19.0;packages:pkgs/http_client_conformance_tests - os:ubuntu-latest;pub-cache-hosted;sdk:2.19.0 - os:ubuntu-latest;pub-cache-hosted - os:ubuntu-latest - - name: Setup Dart SDK - uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d - with: - sdk: "2.19.0" - - id: checkout - name: Checkout repository - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - id: pkgs_http_client_conformance_tests_pub_upgrade - name: pkgs/http_client_conformance_tests; dart pub upgrade - run: dart pub upgrade - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: pkgs/http_client_conformance_tests - - name: "pkgs/http_client_conformance_tests; dart analyze --fatal-infos" - run: dart analyze --fatal-infos - if: "always() && steps.pkgs_http_client_conformance_tests_pub_upgrade.conclusion == 'success'" - working-directory: pkgs/http_client_conformance_tests - job_003: - name: "analyze_and_format; linux; Dart 3.0.0; PKGS: pkgs/http, pkgs/http_profile; `dart analyze --fatal-infos`" - runs-on: ubuntu-latest - steps: - - name: Cache Pub hosted dependencies - uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 - with: - path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/http-pkgs/http_profile;commands:analyze_1" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/http-pkgs/http_profile + os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/http-pkgs/http_client_conformance_tests-pkgs/http_profile os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest @@ -99,6 +69,15 @@ jobs: run: dart analyze --fatal-infos if: "always() && steps.pkgs_http_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http + - id: pkgs_http_client_conformance_tests_pub_upgrade + name: pkgs/http_client_conformance_tests; dart pub upgrade + run: dart pub upgrade + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: pkgs/http_client_conformance_tests + - name: "pkgs/http_client_conformance_tests; dart analyze --fatal-infos" + run: dart analyze --fatal-infos + if: "always() && steps.pkgs_http_client_conformance_tests_pub_upgrade.conclusion == 'success'" + working-directory: pkgs/http_client_conformance_tests - id: pkgs_http_profile_pub_upgrade name: pkgs/http_profile; dart pub upgrade run: dart pub upgrade @@ -108,7 +87,7 @@ jobs: run: dart analyze --fatal-infos if: "always() && steps.pkgs_http_profile_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http_profile - job_004: + job_003: name: "analyze_and_format; linux; Dart dev; PKGS: pkgs/http, pkgs/http_client_conformance_tests, pkgs/http_profile; `dart analyze --fatal-infos`" runs-on: ubuntu-latest steps: @@ -156,7 +135,7 @@ jobs: run: dart analyze --fatal-infos if: "always() && steps.pkgs_http_profile_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http_profile - job_005: + job_004: name: "analyze_and_format; linux; Dart dev; PKGS: pkgs/http, pkgs/http_client_conformance_tests, pkgs/http_profile; `dart format --output=none --set-exit-if-changed .`" runs-on: ubuntu-latest steps: @@ -204,7 +183,7 @@ jobs: run: "dart format --output=none --set-exit-if-changed ." if: "always() && steps.pkgs_http_profile_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http_profile - job_006: + job_005: name: "analyze_and_format; linux; Flutter stable; PKG: pkgs/flutter_http_example; `dart format --output=none --set-exit-if-changed .`" runs-on: ubuntu-latest steps: @@ -234,7 +213,7 @@ jobs: run: "dart format --output=none --set-exit-if-changed ." if: "always() && steps.pkgs_flutter_http_example_pub_upgrade.conclusion == 'success'" working-directory: pkgs/flutter_http_example - job_007: + job_006: name: "analyze_and_format; linux; Flutter stable; PKG: pkgs/flutter_http_example; `flutter analyze --fatal-infos`" runs-on: ubuntu-latest steps: @@ -264,7 +243,7 @@ jobs: run: flutter analyze --fatal-infos if: "always() && steps.pkgs_flutter_http_example_pub_upgrade.conclusion == 'success'" working-directory: pkgs/flutter_http_example - job_008: + job_007: name: "unit_test; linux; Dart 3.0.0; PKG: pkgs/http; `dart run --define=no_default_http_client=true test/no_default_http_client_test.dart`" runs-on: ubuntu-latest steps: @@ -301,8 +280,7 @@ jobs: - job_004 - job_005 - job_006 - - job_007 - job_009: + job_008: name: "unit_test; linux; Dart 3.0.0; PKG: pkgs/http; `dart test --platform chrome`" runs-on: ubuntu-latest steps: @@ -339,8 +317,7 @@ jobs: - job_004 - job_005 - job_006 - - job_007 - job_010: + job_009: name: "unit_test; linux; Dart 3.0.0; PKGS: pkgs/http, pkgs/http_profile; `dart test --platform vm`" runs-on: ubuntu-latest steps: @@ -386,8 +363,7 @@ jobs: - job_004 - job_005 - job_006 - - job_007 - job_011: + job_010: name: "unit_test; linux; Dart dev; PKG: pkgs/http; `dart run --define=no_default_http_client=true test/no_default_http_client_test.dart`" runs-on: ubuntu-latest steps: @@ -424,8 +400,7 @@ jobs: - job_004 - job_005 - job_006 - - job_007 - job_012: + job_011: name: "unit_test; linux; Dart dev; PKG: pkgs/http; `dart test --platform chrome`" runs-on: ubuntu-latest steps: @@ -462,8 +437,7 @@ jobs: - job_004 - job_005 - job_006 - - job_007 - job_013: + job_012: name: "unit_test; linux; Dart dev; PKGS: pkgs/http, pkgs/http_profile; `dart test --platform vm`" runs-on: ubuntu-latest steps: @@ -509,8 +483,7 @@ jobs: - job_004 - job_005 - job_006 - - job_007 - job_014: + job_013: name: "unit_test; linux; Flutter stable; PKG: pkgs/flutter_http_example; `flutter test --platform chrome`" runs-on: ubuntu-latest steps: @@ -547,8 +520,7 @@ jobs: - job_004 - job_005 - job_006 - - job_007 - job_015: + job_014: name: "unit_test; linux; Flutter stable; PKG: pkgs/flutter_http_example; `flutter test`" runs-on: ubuntu-latest steps: @@ -585,8 +557,7 @@ jobs: - job_004 - job_005 - job_006 - - job_007 - job_016: + job_015: name: "unit_test; macos; Flutter stable; PKG: pkgs/flutter_http_example; `flutter test`" runs-on: macos-latest steps: @@ -623,8 +594,7 @@ jobs: - job_004 - job_005 - job_006 - - job_007 - job_017: + job_016: name: "unit_test; windows; Flutter stable; PKG: pkgs/flutter_http_example; `flutter test`" runs-on: windows-latest steps: @@ -651,4 +621,3 @@ jobs: - job_004 - job_005 - job_006 - - job_007 diff --git a/analysis_options.yaml b/analysis_options.yaml index 7d741bd4f1..e536739953 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -14,15 +14,10 @@ linter: - avoid_returning_this - avoid_unused_constructor_parameters - cascade_invocations - - comment_references - join_return_with_assignment - missing_whitespace_between_adjacent_strings - no_adjacent_strings_in_list - no_runtimeType_toString - - prefer_const_constructors - prefer_const_declarations - prefer_expression_function_bodies - - prefer_relative_imports - - test_types_in_equals - use_string_buffers - - use_super_parameters diff --git a/pkgs/cronet_http/example/pubspec.yaml b/pkgs/cronet_http/example/pubspec.yaml index 568cef98df..5bb80276a6 100644 --- a/pkgs/cronet_http/example/pubspec.yaml +++ b/pkgs/cronet_http/example/pubspec.yaml @@ -4,7 +4,7 @@ description: Demonstrates how to use the cronet_http plugin. publish_to: 'none' environment: - sdk: "^3.0.0" + sdk: ^3.0.0 dependencies: cached_network_image: ^3.2.3 @@ -13,10 +13,10 @@ dependencies: cupertino_icons: ^1.0.2 flutter: sdk: flutter - http: ^0.13.5 + http: ^1.0.0 dev_dependencies: - dart_flutter_team_lints: ^1.0.0 + dart_flutter_team_lints: ^2.0.0 flutter_test: sdk: flutter http_client_conformance_tests: diff --git a/pkgs/cronet_http/pubspec.yaml b/pkgs/cronet_http/pubspec.yaml index 82390c8d52..b7c417de09 100644 --- a/pkgs/cronet_http/pubspec.yaml +++ b/pkgs/cronet_http/pubspec.yaml @@ -15,7 +15,7 @@ dependencies: jni: ^0.7.2 dev_dependencies: - dart_flutter_team_lints: ^1.0.0 + dart_flutter_team_lints: ^2.0.0 jnigen: ^0.7.0 xml: ^6.1.0 yaml_edit: ^2.0.3 diff --git a/pkgs/cupertino_http/example/integration_test/client_test.dart b/pkgs/cupertino_http/example/integration_test/client_test.dart index 9247783a09..1b63dc09b6 100644 --- a/pkgs/cupertino_http/example/integration_test/client_test.dart +++ b/pkgs/cupertino_http/example/integration_test/client_test.dart @@ -45,7 +45,7 @@ void testClient(Client client) { } final request = StreamedRequest('POST', uri); request.sink.add(data); - request.sink.close(); + await request.sink.close(); await client.send(request); expect(serverHash, sha1.convert(data).bytes); }); diff --git a/pkgs/cupertino_http/example/pubspec.yaml b/pkgs/cupertino_http/example/pubspec.yaml index be727312a2..bae184b71c 100644 --- a/pkgs/cupertino_http/example/pubspec.yaml +++ b/pkgs/cupertino_http/example/pubspec.yaml @@ -16,12 +16,12 @@ dependencies: cupertino_icons: ^1.0.2 flutter: sdk: flutter - http: ^0.13.5 + http: ^1.0.0 dev_dependencies: convert: ^3.1.1 crypto: ^3.0.3 - dart_flutter_team_lints: ^1.0.0 + dart_flutter_team_lints: ^2.0.0 ffi: ^2.0.1 flutter_test: sdk: flutter diff --git a/pkgs/cupertino_http/pubspec.yaml b/pkgs/cupertino_http/pubspec.yaml index 9d639a8450..5026614c88 100644 --- a/pkgs/cupertino_http/pubspec.yaml +++ b/pkgs/cupertino_http/pubspec.yaml @@ -17,7 +17,7 @@ dependencies: http: '>=0.13.4 <2.0.0' dev_dependencies: - dart_flutter_team_lints: ^1.0.0 + dart_flutter_team_lints: ^2.0.0 ffigen: ^9.0.1 flutter: diff --git a/pkgs/flutter_http_example/pubspec.yaml b/pkgs/flutter_http_example/pubspec.yaml index 6f3d1ba729..f2cf6c19f0 100644 --- a/pkgs/flutter_http_example/pubspec.yaml +++ b/pkgs/flutter_http_example/pubspec.yaml @@ -17,11 +17,11 @@ dependencies: fetch_client: ^1.0.2 flutter: sdk: flutter - http: ^0.13.5 + http: ^1.0.0 provider: ^6.0.5 dev_dependencies: - dart_flutter_team_lints: ^1.0.0 + dart_flutter_team_lints: ^2.0.0 flutter_test: sdk: flutter integration_test: diff --git a/pkgs/http/pubspec.yaml b/pkgs/http/pubspec.yaml index ec23e2d608..37d397ea7d 100644 --- a/pkgs/http/pubspec.yaml +++ b/pkgs/http/pubspec.yaml @@ -12,7 +12,7 @@ dependencies: meta: ^1.3.0 dev_dependencies: - dart_flutter_team_lints: ^1.0.0 + dart_flutter_team_lints: ^2.0.0 fake_async: ^1.2.0 http_client_conformance_tests: path: ../http_client_conformance_tests/ diff --git a/pkgs/http_client_conformance_tests/pubspec.yaml b/pkgs/http_client_conformance_tests/pubspec.yaml index 42640597ce..de5ffb61b9 100644 --- a/pkgs/http_client_conformance_tests/pubspec.yaml +++ b/pkgs/http_client_conformance_tests/pubspec.yaml @@ -6,14 +6,14 @@ publish_to: none repository: https://github.com/dart-lang/http/tree/master/pkgs/http_client_conformance_tests environment: - sdk: '>=2.19.0 <3.0.0' + sdk: ^3.0.0 dependencies: async: ^2.8.2 dart_style: ^2.2.3 - http: '>=0.13.4 <2.0.0' + http: ^1.0.0 stream_channel: ^2.1.1 test: ^1.21.2 dev_dependencies: - dart_flutter_team_lints: ^1.0.0 + dart_flutter_team_lints: ^2.0.0 diff --git a/pkgs/java_http/pubspec.yaml b/pkgs/java_http/pubspec.yaml index ecba4f13e6..a0e100dcfd 100644 --- a/pkgs/java_http/pubspec.yaml +++ b/pkgs/java_http/pubspec.yaml @@ -14,9 +14,8 @@ dependencies: path: ^1.8.0 dev_dependencies: - dart_flutter_team_lints: ^1.0.0 + dart_flutter_team_lints: ^2.0.0 http_client_conformance_tests: path: ../http_client_conformance_tests/ jnigen: ^0.5.0 - lints: ^2.0.0 test: ^1.21.0 diff --git a/tool/ci.sh b/tool/ci.sh index 26395d208a..44ea987b60 100755 --- a/tool/ci.sh +++ b/tool/ci.sh @@ -1,9 +1,10 @@ #!/bin/bash -# Created with package:mono_repo v6.6.0 +# Created with package:mono_repo v6.6.1 # Support built in commands on windows out of the box. + # When it is a flutter repo (check the pubspec.yaml for "sdk: flutter") -# then "flutter" is called instead of "pub". +# then "flutter pub" is called instead of "dart pub". # This assumes that the Flutter SDK has been installed in a previous step. function pub() { if grep -Fq "sdk: flutter" "${PWD}/pubspec.yaml"; then @@ -12,18 +13,13 @@ function pub() { command dart pub "$@" fi } -# When it is a flutter repo (check the pubspec.yaml for "sdk: flutter") -# then "flutter" is called instead of "pub". -# This assumes that the Flutter SDK has been installed in a previous step. + function format() { - if grep -Fq "sdk: flutter" "${PWD}/pubspec.yaml"; then - command flutter format "$@" - else - command dart format "$@" - fi + command dart format "$@" } + # When it is a flutter repo (check the pubspec.yaml for "sdk: flutter") -# then "flutter" is called instead of "pub". +# then "flutter analyze" is called instead of "dart analyze". # This assumes that the Flutter SDK has been installed in a previous step. function analyze() { if grep -Fq "sdk: flutter" "${PWD}/pubspec.yaml"; then