From 730d5acfc83c34b1c85af5eeb8b1654763279738 Mon Sep 17 00:00:00 2001 From: Alex Li Date: Fri, 22 Sep 2023 10:36:47 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=F0=9F=92=9A=20Fix=20publishing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dio/dartdoc_options.yaml | 4 ++-- dio/{docs => doc}/migration_guide.md | 0 dio/{docs => doc}/plugins.md | 30 ++++++++++++++-------------- dio/pubspec.yaml | 2 +- example/pubspec.yaml | 2 +- example_flutter_app/pubspec.yaml | 2 +- plugins/cookie_manager/pubspec.yaml | 2 +- plugins/http2_adapter/pubspec.yaml | 2 +- 8 files changed, 22 insertions(+), 22 deletions(-) rename dio/{docs => doc}/migration_guide.md (100%) rename dio/{docs => doc}/plugins.md (56%) diff --git a/dio/dartdoc_options.yaml b/dio/dartdoc_options.yaml index 9455461ab..6adf5998a 100644 --- a/dio/dartdoc_options.yaml +++ b/dio/dartdoc_options.yaml @@ -2,6 +2,6 @@ dartdoc: showUndocumentedCategories: true categories: "Migration Guide": - markdown: docs/migration_guide.md + markdown: doc/migration_guide.md "Plugins": - markdown: docs/plugins.md + markdown: doc/plugins.md diff --git a/dio/docs/migration_guide.md b/dio/doc/migration_guide.md similarity index 100% rename from dio/docs/migration_guide.md rename to dio/doc/migration_guide.md diff --git a/dio/docs/plugins.md b/dio/doc/plugins.md similarity index 56% rename from dio/docs/plugins.md rename to dio/doc/plugins.md index 0af964d68..1135b3b1d 100644 --- a/dio/docs/plugins.md +++ b/dio/doc/plugins.md @@ -1,18 +1,18 @@ # Plugins -| Repository | Status | Description | -|--------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------| -| [dio_cookie_manager](https://github.com/cfug/dio/blob/main/plugins/cookie_manager) | [![Pub](https://img.shields.io/pub/v/dio_cookie_manager.svg)](https://pub.dev/packages/dio_cookie_manager) | A cookie manager for Dio | -| [dio_http2_adapter](https://github.com/cfug/dio/blob/main/plugins/http2_adapter) | [![Pub](https://img.shields.io/pub/v/dio_http2_adapter.svg)](https://pub.dev/packages/dio_http2_adapter) | A Dio HttpClientAdapter which support Http/2.0 | -| [native_dio_adapter](https://github.com/cfug/dio/blob/main/plugins/native_dio_adapter) | [![Pub](https://img.shields.io/pub/v/native_dio_adapter.svg)](https://pub.dev/packages/native_dio_adapter) | An adapter for Dio which makes use of cupertino_http and cronet_http to delegate HTTP requests to the native platform. | -| [dio_smart_retry](https://github.com/rodion-m/dio_smart_retry) | [![Pub](https://img.shields.io/pub/v/dio_smart_retry.svg)](https://pub.dev/packages/dio_smart_retry) | Flexible retry library for Dio | -| [http_certificate_pinning](https://github.com/diefferson/http_certificate_pinning) | [![Pub](https://img.shields.io/pub/v/http_certificate_pinning.svg)](https://pub.dev/packages/http_certificate_pinning) | Https Certificate pinning for Flutter | -| [dio_intercept_to_curl](https://github.com/blackflamedigital/dio_intercept_to_curl) | [![Pub](https://img.shields.io/pub/v/dio_intercept_to_curl.svg)](https://pub.dev/packages/dio_intercept_to_curl) | A Flutter curl-command generator for Dio. | -| [dio_cache_interceptor](https://github.com/llfbandit/dio_cache_interceptor) | [![Pub](https://img.shields.io/pub/v/dio_cache_interceptor.svg)](https://pub.dev/packages/dio_cache_interceptor) | Dio HTTP cache interceptor with multiple stores respecting HTTP directives (or not) | -| [dio_http_cache](https://github.com/hurshi/dio-http-cache) | [![Pub](https://img.shields.io/pub/v/dio_http_cache.svg)](https://pub.dev/packages/dio_http_cache) | A simple cache library for Dio like Rxcache in Android | -| [pretty_dio_logger](https://github.com/Milad-Akarie/pretty_dio_logger) | [![Pub](https://img.shields.io/pub/v/pretty_dio_logger.svg)](https://pub.dev/packages/pretty_dio_logger) | Pretty Dio logger is a Dio interceptor that logs network calls in a pretty, easy to read format. | -| [dio_image_provider](https://github.com/ueman/image_provider) | [![Pub](https://img.shields.io/pub/v/dio_image_provider.svg)](https://pub.dev/packages/dio_image_provider) | An image provider which makes use of package:dio to instead of dart:io | -| [flutter_ume_kit_dio](https://github.com/cfug/flutter_ume_kits/tree/main/packages/flutter_ume_kit_dio) | [![Pub](https://img.shields.io/pub/v/flutter_ume_kit_dio.svg)](https://pub.dev/packages/flutter_ume_kit_dio) | A debug kit of dio on flutter_ume | -| [sentry_dio](https://github.com/getsentry/sentry-dart) | [![Pub](https://img.shields.io/pub/v/sentry_dio.svg)](https://pub.dev/packages/sentry_dio) | An integration which adds support for performance tracing for the Dio package. | -| [talker_dio_logger](https://github.com/Frezyx/talker/tree/master/packages/talker_dio_logger) | [![Pub](https://img.shields.io/pub/v/talker_dio_logger.svg)](https://pub.dev/packages/talker_dio_logger) | Colorful and customizable dio logger with a lightweight design and talker additonal functionality | \ No newline at end of file +| Repository | Status | Description | +|--------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------| +| [dio_cookie_manager](https://github.com/cfug/dio/blob/main/plugins/cookie_manager) | [![Pub](https://img.shields.io/pub/v/dio_cookie_manager.svg)](https://pub.dev/packages/dio_cookie_manager) | A cookie manager for Dio | +| [dio_http2_adapter](https://github.com/cfug/dio/blob/main/plugins/http2_adapter) | [![Pub](https://img.shields.io/pub/v/dio_http2_adapter.svg)](https://pub.dev/packages/dio_http2_adapter) | A Dio HttpClientAdapter which support Http/2.0 | +| [native_dio_adapter](https://github.com/cfug/dio/blob/main/plugins/native_dio_adapter) | [![Pub](https://img.shields.io/pub/v/native_dio_adapter.svg)](https://pub.dev/packages/native_dio_adapter) | An adapter for Dio which makes use of cupertino_http and cronet_http to delegate HTTP requests to the native platform. | +| [dio_smart_retry](https://github.com/rodion-m/dio_smart_retry) | [![Pub](https://img.shields.io/pub/v/dio_smart_retry.svg)](https://pub.dev/packages/dio_smart_retry) | Flexible retry library for Dio | +| [http_certificate_pinning](https://github.com/diefferson/http_certificate_pinning) | [![Pub](https://img.shields.io/pub/v/http_certificate_pinning.svg)](https://pub.dev/packages/http_certificate_pinning) | Https Certificate pinning for Flutter | +| [dio_intercept_to_curl](https://github.com/blackflamedigital/dio_intercept_to_curl) | [![Pub](https://img.shields.io/pub/v/dio_intercept_to_curl.svg)](https://pub.dev/packages/dio_intercept_to_curl) | A Flutter curl-command generator for Dio. | +| [dio_cache_interceptor](https://github.com/llfbandit/dio_cache_interceptor) | [![Pub](https://img.shields.io/pub/v/dio_cache_interceptor.svg)](https://pub.dev/packages/dio_cache_interceptor) | Dio HTTP cache interceptor with multiple stores respecting HTTP directives (or not) | +| [dio_http_cache](https://github.com/hurshi/dio-http-cache) | [![Pub](https://img.shields.io/pub/v/dio_http_cache.svg)](https://pub.dev/packages/dio_http_cache) | A simple cache library for Dio like Rxcache in Android | +| [pretty_dio_logger](https://github.com/Milad-Akarie/pretty_dio_logger) | [![Pub](https://img.shields.io/pub/v/pretty_dio_logger.svg)](https://pub.dev/packages/pretty_dio_logger) | Pretty Dio logger is a Dio interceptor that logs network calls in a pretty, easy to read format. | +| [dio_image_provider](https://github.com/ueman/image_provider) | [![Pub](https://img.shields.io/pub/v/dio_image_provider.svg)](https://pub.dev/packages/dio_image_provider) | An image provider which makes use of package:dio to instead of dart:io | +| [flutter_ume_kit_dio](https://github.com/cfug/flutter_ume_kits/tree/main/packages/flutter_ume_kit_dio) | [![Pub](https://img.shields.io/pub/v/flutter_ume_kit_dio.svg)](https://pub.dev/packages/flutter_ume_kit_dio) | A debug kit of dio on flutter_ume | +| [sentry_dio](https://github.com/getsentry/sentry-dart) | [![Pub](https://img.shields.io/pub/v/sentry_dio.svg)](https://pub.dev/packages/sentry_dio) | An integration which adds support for performance tracing for the Dio package. | +| [talker_dio_logger](https://github.com/Frezyx/talker/tree/master/packages/talker_dio_logger) | [![Pub](https://img.shields.io/pub/v/talker_dio_logger.svg)](https://pub.dev/packages/talker_dio_logger) | Colorful and customizable dio logger with a lightweight design and talker additonal functionality | \ No newline at end of file diff --git a/dio/pubspec.yaml b/dio/pubspec.yaml index 6f79f157b..f4d51342d 100644 --- a/dio/pubspec.yaml +++ b/dio/pubspec.yaml @@ -17,7 +17,7 @@ repository: https://github.com/cfug/dio/blob/main/dio issue_tracker: https://github.com/cfug/dio/issues environment: - sdk: '>=2.15.0 <3.0.0' + sdk: '>=2.15.0 <4.0.0' dependencies: async: ^2.8.2 diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 06ebd7db8..f890bc2a9 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -4,7 +4,7 @@ version: 0.0.1 publish_to: "none" environment: - sdk: ">=2.15.0 <3.0.0" + sdk: ">=2.15.0 <4.0.0" dependencies: cookie_jar: diff --git a/example_flutter_app/pubspec.yaml b/example_flutter_app/pubspec.yaml index 7660ed17f..ef0043ef0 100644 --- a/example_flutter_app/pubspec.yaml +++ b/example_flutter_app/pubspec.yaml @@ -18,7 +18,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev version: 1.0.0+1 environment: - sdk: ">=2.15.0 <3.0.0" + sdk: ">=2.15.0 <4.0.0" dependencies: flutter: diff --git a/plugins/cookie_manager/pubspec.yaml b/plugins/cookie_manager/pubspec.yaml index 01e4531b3..1d498d847 100644 --- a/plugins/cookie_manager/pubspec.yaml +++ b/plugins/cookie_manager/pubspec.yaml @@ -13,7 +13,7 @@ repository: https://github.com/cfug/dio/blob/main/plugins/cookie_manager issue_tracker: https://github.com/cfug/dio/issues environment: - sdk: ">=2.15.0 <3.0.0" + sdk: ">=2.15.0 <4.0.0" dependencies: cookie_jar: ^4.0.0 diff --git a/plugins/http2_adapter/pubspec.yaml b/plugins/http2_adapter/pubspec.yaml index c527855d5..1c5be37b1 100644 --- a/plugins/http2_adapter/pubspec.yaml +++ b/plugins/http2_adapter/pubspec.yaml @@ -12,7 +12,7 @@ repository: https://github.com/cfug/dio/blob/main/plugins/http2_adapter issue_tracker: https://github.com/cfug/dio/issues environment: - sdk: ">=2.15.0 <3.0.0" + sdk: ">=2.15.0 <4.0.0" dependencies: http2: ^2.0.0 From 2d884d4eb1e3f89059db2a75764d04e6a01f4289 Mon Sep 17 00:00:00 2001 From: Alex Li Date: Fri, 22 Sep 2023 10:42:37 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=F0=9F=92=9A=20Setup=20dry-run=20correctly?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/publishable.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publishable.yml b/.github/workflows/publishable.yml index 20523c389..2839be0a8 100644 --- a/.github/workflows/publishable.yml +++ b/.github/workflows/publishable.yml @@ -27,10 +27,8 @@ jobs: directory: ["dio", "plugins/cookie_manager", "plugins/http2_adapter", "plugins/native_dio_adapter"] steps: - uses: actions/checkout@v3 - - name: Publish dry run - uses: k-paxian/dart-package-publisher@master + - uses: dart-lang/setup-dart@v1.3 with: - credentialJson: 'MockCredentialJson' - dryRunOnly: true - relativePath: ${{ matrix.directory }} - skipTests: true + sdk: stable + - run: dart pub publish --dry-run + working-directory: ${{ matrix.directory }} From 93d8c1a52e4c74ed74408b007a1d2f3639f5f03d Mon Sep 17 00:00:00 2001 From: Alex Li Date: Fri, 22 Sep 2023 10:51:42 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=F0=9F=92=9A=20Setup=20steps=20correctly?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/publishable.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publishable.yml b/.github/workflows/publishable.yml index 2839be0a8..0f5e3900f 100644 --- a/.github/workflows/publishable.yml +++ b/.github/workflows/publishable.yml @@ -27,8 +27,10 @@ jobs: directory: ["dio", "plugins/cookie_manager", "plugins/http2_adapter", "plugins/native_dio_adapter"] steps: - uses: actions/checkout@v3 - - uses: dart-lang/setup-dart@v1.3 - with: - sdk: stable + - uses: subosito/flutter-action@v2 + - run: | + if grep -q "flutter:" "pubspec.yaml"; then + flutter pub get + fi - run: dart pub publish --dry-run working-directory: ${{ matrix.directory }} From 9f78e830830f889e65a9b25494b4288e3367aff2 Mon Sep 17 00:00:00 2001 From: Alex Li Date: Fri, 22 Sep 2023 10:55:15 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=F0=9F=99=88=20Fix=20ignores?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/native_dio_adapter/.gitignore | 1 - plugins/native_dio_adapter/example/pubspec_overrides.yaml | 3 --- 2 files changed, 4 deletions(-) delete mode 100644 plugins/native_dio_adapter/example/pubspec_overrides.yaml diff --git a/plugins/native_dio_adapter/.gitignore b/plugins/native_dio_adapter/.gitignore index 48f7ab40e..bef1b42a1 100644 --- a/plugins/native_dio_adapter/.gitignore +++ b/plugins/native_dio_adapter/.gitignore @@ -19,4 +19,3 @@ pubspec_overrides.yaml # https://dart.dev/guides/libraries/private-files#pubspeclock. pubspec.lock .DS_Store -/pubspec_overrides.yaml diff --git a/plugins/native_dio_adapter/example/pubspec_overrides.yaml b/plugins/native_dio_adapter/example/pubspec_overrides.yaml deleted file mode 100644 index 9bc2504f6..000000000 --- a/plugins/native_dio_adapter/example/pubspec_overrides.yaml +++ /dev/null @@ -1,3 +0,0 @@ -dependency_overrides: - dio: - path: ../../../dio From 06b4bd41a632a56b4928881fcd62828899c95fc2 Mon Sep 17 00:00:00 2001 From: Alex Li Date: Fri, 22 Sep 2023 10:56:10 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=F0=9F=92=9A=20++?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/publishable.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publishable.yml b/.github/workflows/publishable.yml index 0f5e3900f..95ed42c52 100644 --- a/.github/workflows/publishable.yml +++ b/.github/workflows/publishable.yml @@ -29,7 +29,7 @@ jobs: - uses: actions/checkout@v3 - uses: subosito/flutter-action@v2 - run: | - if grep -q "flutter:" "pubspec.yaml"; then + if grep -q "flutter:" "${{ matrix.directory }}/pubspec.yaml"; then flutter pub get fi - run: dart pub publish --dry-run