diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d8e97d49..4ab9a981 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,6 +3,10 @@ name: build on: workflow_dispatch: +env: + GO_VERSION: 1.19 + FLUTTER_VERSION: 3.10.0 + permissions: contents: write @@ -24,11 +28,12 @@ jobs: needs: [get-release] steps: - uses: actions/checkout@v3 - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v4 with: - go-version: "^1.19" - cache: true + go-version: ${{ env.GO_VERSION }} - uses: subosito/flutter-action@v2 + with: + flutter-version: ${{ env.FLUTTER_VERSION }} - name: Build env: VERSION: ${{ needs.get-release.outputs.tag_name }} @@ -123,10 +128,9 @@ jobs: needs: [get-release] steps: - uses: actions/checkout@v3 - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v4 with: - go-version: "^1.19" - cache: true + go-version: ${{ env.GO_VERSION }} - name: Build run: | docker pull techknowlogick/xgo:go-1.19.x @@ -142,14 +146,15 @@ jobs: needs: [get-release, build-macos-arm64-lib] steps: - uses: actions/checkout@v3 - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v4 with: - go-version: "^1.19" - cache: true + go-version: ${{ env.GO_VERSION }} - uses: actions/setup-node@v3 with: node-version: 16 - uses: subosito/flutter-action@v2 + with: + flutter-version: ${{ env.FLUTTER_VERSION }} - name: Install appdmg run: npm install -g appdmg - uses: actions/download-artifact@v3 @@ -197,11 +202,12 @@ jobs: needs: [get-release] steps: - uses: actions/checkout@v3 - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v4 with: - go-version: "^1.19" - cache: true + go-version: ${{ env.GO_VERSION }} - uses: subosito/flutter-action@v2 + with: + flutter-version: ${{ env.FLUTTER_VERSION }} - run: | sudo apt-get update -y sudo apt-get install -y ninja-build libgtk-3-dev @@ -256,15 +262,16 @@ jobs: needs: [get-release] steps: - uses: actions/checkout@v3 - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v4 with: - go-version: "^1.19" - cache: true + go-version: ${{ env.GO_VERSION }} - uses: actions/setup-java@v3 with: distribution: "zulu" java-version: "11" - uses: subosito/flutter-action@v2 + with: + flutter-version: ${{ env.FLUTTER_VERSION }} - name: Build env: VERSION: ${{ needs.get-release.outputs.tag_name }} @@ -292,11 +299,12 @@ jobs: needs: [get-release] steps: - uses: actions/checkout@v3 - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v4 with: - go-version: "^1.19" - cache: true + go-version: ${{ env.GO_VERSION }} - uses: subosito/flutter-action@v2 + with: + flutter-version: ${{ env.FLUTTER_VERSION }} - name: Build env: VERSION: ${{ needs.get-release.outputs.tag_name }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c6f3169c..50752531 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,6 +16,9 @@ on: - "go.sum" - "Dockerfile" +env: + GO_VERSION: 1.19 + permissions: contents: write @@ -28,9 +31,9 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v4 with: - go-version: "^1.19" + go-version: ${{ env.GO_VERSION }} - uses: release-drafter/release-drafter@v5 id: create_release env: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6c51b66a..b267c302 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,6 +26,10 @@ on: - "go.mod" - "go.sum" +env: + GO_VERSION: 1.19 + FLUTTER_VERSION: 3.10.0 + jobs: # lint: # name: Lint @@ -45,10 +49,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v4 with: - go-version: "^1.19" - cache: true + go-version: ${{ env.GO_VERSION }} - name: Run Unit tests. run: go test $(go list ./... | grep -v /cmd/ | grep -v /bind/ ) -v -covermode=count -coverprofile=coverage.txt - uses: codecov/codecov-action@v3 @@ -61,11 +64,12 @@ jobs: needs: [test] steps: - uses: actions/checkout@v3 - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v4 with: - go-version: "^1.19" - cache: true + go-version: ${{ env.GO_VERSION }} - uses: subosito/flutter-action@v2 + with: + flutter-version: ${{ env.FLUTTER_VERSION }} - run: | sudo apt-get update -y sudo apt-get install -y ninja-build libgtk-3-dev diff --git a/ui/flutter/lib/api/api.dart b/ui/flutter/lib/api/api.dart index 70c094c3..3e9c3a06 100644 --- a/ui/flutter/lib/api/api.dart +++ b/ui/flutter/lib/api/api.dart @@ -1,4 +1,3 @@ -import 'dart:convert'; import 'dart:io'; import 'package:dio/dio.dart'; diff --git a/ui/flutter/lib/app/modules/create/views/create_view.dart b/ui/flutter/lib/app/modules/create/views/create_view.dart index 4ad5d562..9cf24ff4 100644 --- a/ui/flutter/lib/app/modules/create/views/create_view.dart +++ b/ui/flutter/lib/app/modules/create/views/create_view.dart @@ -2,7 +2,6 @@ import 'package:desktop_drop/desktop_drop.dart'; import 'package:flutter/material.dart'; import 'package:get/get.dart'; import '../../../../api/model/resolve_result.dart'; -import '../../../../api/model/result.dart'; import 'package:rounded_loading_button/rounded_loading_button.dart'; import '../../../../api/api.dart'; diff --git a/ui/flutter/lib/app/modules/task/controllers/task_downloaded_controller.dart b/ui/flutter/lib/app/modules/task/controllers/task_downloaded_controller.dart index 50d32cad..6f4dfd11 100644 --- a/ui/flutter/lib/app/modules/task/controllers/task_downloaded_controller.dart +++ b/ui/flutter/lib/app/modules/task/controllers/task_downloaded_controller.dart @@ -1,4 +1,3 @@ -import 'dart:async'; import 'package:gopeed/app/modules/task/controllers/task_list_controller.dart'; diff --git a/ui/flutter/lib/app/views/views/buid_task_list_view.dart b/ui/flutter/lib/app/views/views/buid_task_list_view.dart index c02d0d32..8a2d7d2c 100644 --- a/ui/flutter/lib/app/views/views/buid_task_list_view.dart +++ b/ui/flutter/lib/app/views/views/buid_task_list_view.dart @@ -1,8 +1,6 @@ -import 'dart:io'; import 'package:flutter/material.dart'; import 'package:get/get.dart'; -import 'package:url_launcher/url_launcher.dart'; import 'package:path/path.dart' as path; import '../../../api/api.dart'; diff --git a/ui/flutter/pubspec.lock b/ui/flutter/pubspec.lock index 51a23937..66327a32 100644 --- a/ui/flutter/pubspec.lock +++ b/ui/flutter/pubspec.lock @@ -37,10 +37,10 @@ packages: dependency: transitive description: name: async - sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0 + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" url: "https://pub.flutter-io.cn" source: hosted - version: "2.10.0" + version: "2.11.0" badges: dependency: "direct main" description: @@ -125,10 +125,10 @@ packages: dependency: transitive description: name: characters - sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" url: "https://pub.flutter-io.cn" source: hosted - version: "1.2.1" + version: "1.3.0" checked_yaml: dependency: transitive description: @@ -165,10 +165,10 @@ packages: dependency: transitive description: name: collection - sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0 + sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c" url: "https://pub.flutter-io.cn" source: hosted - version: "1.17.0" + version: "1.17.1" context_menus: dependency: "direct main" description: @@ -285,10 +285,10 @@ packages: dependency: "direct main" description: name: fluent_ui - sha256: "55294f8f8b1aab6ac7a2be529b1dcb4affcff3e3176e5e50e5f1918a40050df7" + sha256: "88d6720cfded16f53ff83f0b6de3063d40664ee21696994fffc5efc5667b4fc5" url: "https://pub.flutter-io.cn" source: hosted - version: "4.4.0" + version: "4.6.0" flutter: dependency: "direct main" description: flutter @@ -399,13 +399,13 @@ packages: source: hosted version: "3.2.2" intl: - dependency: "direct main" + dependency: transitive description: name: intl - sha256: "910f85bce16fb5c6f614e117efa303e85a1731bb0081edf3604a2ae6e9a3cc91" + sha256: a3715e3bc90294e971cb7dc063fbf3cd9ee0ebf8604ffeafabd9e6f16abbdbe6 url: "https://pub.flutter-io.cn" source: hosted - version: "0.17.0" + version: "0.18.0" io: dependency: transitive description: @@ -418,10 +418,10 @@ packages: dependency: transitive description: name: js - sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7" + sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 url: "https://pub.flutter-io.cn" source: hosted - version: "0.6.5" + version: "0.6.7" json_annotation: dependency: "direct main" description: @@ -498,10 +498,10 @@ packages: dependency: transitive description: name: matcher - sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72" + sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb" url: "https://pub.flutter-io.cn" source: hosted - version: "0.12.13" + version: "0.12.15" material_color_utilities: dependency: transitive description: @@ -510,14 +510,22 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "0.2.0" + math_expressions: + dependency: transitive + description: + name: math_expressions + sha256: "3576593617c3870d75728a751f6ec6e606706d44e363f088ac394b5a28a98064" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.4.0" meta: dependency: transitive description: name: meta - sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42" + sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" url: "https://pub.flutter-io.cn" source: hosted - version: "1.8.0" + version: "1.9.1" mime: dependency: transitive description: @@ -554,10 +562,10 @@ packages: dependency: "direct main" description: name: path - sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b + sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" url: "https://pub.flutter-io.cn" source: hosted - version: "1.8.2" + version: "1.8.3" path_provider: dependency: "direct main" description: @@ -706,10 +714,10 @@ packages: dependency: transitive description: name: scroll_pos - sha256: cfca311b6b8d51538ff90e206fbe6ce3b36e7125ea6da4a40eb626c7f9f083b1 + sha256: "4246bff3afc779d87cdf650a67d42d67ae71b23ff020d14592e6b89e28a7f9cc" url: "https://pub.flutter-io.cn" source: hosted - version: "0.3.0" + version: "0.4.0" shared_preferences: dependency: "direct main" description: @@ -871,10 +879,10 @@ packages: dependency: transitive description: name: test_api - sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206 + sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb url: "https://pub.flutter-io.cn" source: hosted - version: "0.4.16" + version: "0.5.1" timing: dependency: transitive description: @@ -1012,5 +1020,5 @@ packages: source: hosted version: "3.1.1" sdks: - dart: ">=2.18.0 <3.0.0" - flutter: ">=3.7.0" + dart: ">=3.0.0-0 <=3.0.0" + flutter: ">=3.10.0" diff --git a/ui/flutter/pubspec.yaml b/ui/flutter/pubspec.yaml index 8272a28c..c225d66b 100644 --- a/ui/flutter/pubspec.yaml +++ b/ui/flutter/pubspec.yaml @@ -49,7 +49,6 @@ dependencies: shared_preferences: ^2.0.15 logger: ^1.3.0 desktop_drop: ^0.3.3 - intl: ^0.17.0 package_info_plus: ^3.0.2 fluent_ui: ^4.4.0 path: any diff --git a/ui/flutter/test/widget_test.dart b/ui/flutter/test/widget_test.dart index fadd8656..21a3e74c 100644 --- a/ui/flutter/test/widget_test.dart +++ b/ui/flutter/test/widget_test.dart @@ -5,10 +5,8 @@ // gestures. You can also use WidgetTester to find child widgets in the widget // tree, read text, and verify that the values of widget properties are correct. -import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:gopeed/main.dart'; void main() { testWidgets('Counter increments smoke test', (WidgetTester tester) async {});