diff --git a/.flutter-version b/.flutter-version new file mode 100644 index 000000000..bb155b21f --- /dev/null +++ b/.flutter-version @@ -0,0 +1 @@ +3.41.5 diff --git a/.github/actions/android/action.yml b/.github/actions/android/action.yml index 542de7eba..7b6a752f4 100644 --- a/.github/actions/android/action.yml +++ b/.github/actions/android/action.yml @@ -36,7 +36,7 @@ runs: uses: subosito/flutter-action@v2 with: cache: true - flutter-version-file: pubspec.yaml + flutter-version-file: .flutter-version - name: Build Android APK/AAB shell: bash diff --git a/.github/actions/common/action.yml b/.github/actions/common/action.yml index ba6349e2f..89f70bdfc 100644 --- a/.github/actions/common/action.yml +++ b/.github/actions/common/action.yml @@ -8,7 +8,7 @@ runs: uses: subosito/flutter-action@v2 with: cache: true - flutter-version-file: pubspec.yaml + flutter-version-file: .flutter-version - name: Fetch Flutter Dependencies shell: bash diff --git a/.github/actions/ios/action.yml b/.github/actions/ios/action.yml index 52deb0e14..e8bd990e2 100644 --- a/.github/actions/ios/action.yml +++ b/.github/actions/ios/action.yml @@ -17,7 +17,7 @@ runs: uses: subosito/flutter-action@v2 with: cache: false # TODO set to after https://github.com/actions/runner/issues/449 is fixed - flutter-version-file: pubspec.yaml + flutter-version-file: .flutter-version - name: Update Podfile shell: bash diff --git a/.github/actions/linux-arm64/action.yml b/.github/actions/linux-arm64/action.yml index 872033584..7926355a8 100644 --- a/.github/actions/linux-arm64/action.yml +++ b/.github/actions/linux-arm64/action.yml @@ -2,13 +2,14 @@ name: "Linux ARM64 Workflow" inputs: VERSION_NAME: - description: 'Version Name to be used for build' + description: "Version Name to be used for build" required: false - default: '1.0.0' + default: "1.0.0" + VERSION_CODE: - description: 'Version Code to be used for build' + description: "Version Code to be used for build" required: true - default: '1' + default: "1" runs: using: "composite" @@ -16,45 +17,49 @@ runs: - name: Install dependencies from Apt shell: bash run: | - sudo apt-get update -y; - sudo apt-get install -y curl git unzip xz-utils zip libglu1-mesa clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev libstdc++-12-dev yq + sudo apt-get update -y + sudo apt-get install -y \ + curl git unzip xz-utils zip libglu1-mesa clang cmake ninja-build \ + pkg-config libgtk-3-dev liblzma-dev libstdc++-12-dev - - name: Clone Flutter + - name: Read Flutter version shell: bash run: | - # get Flutter version from pubspec.yaml - FLUTTER_VERSION="$(yq -r '.environment.flutter' pubspec.yaml)" + FLUTTER_VERSION=$(cat .flutter-version) + echo "Using Flutter version: $FLUTTER_VERSION" + echo "FLUTTER_VERSION=$FLUTTER_VERSION" >> $GITHUB_ENV - # Shallow-clone Flutter to reduce download size - git clone --depth 1 --branch $FLUTTER_VERSION https://github.com/flutter/flutter.git $RUNNER_TEMP/flutter - - # Add Flutter to PATH - echo "$RUNNER_TEMP/flutter/bin" >> $GITHUB_PATH + - name: Clone Flutter + shell: bash + run: | + git clone --depth 1 --branch "$FLUTTER_VERSION" https://github.com/flutter/flutter.git "$RUNNER_TEMP/flutter" + echo "$RUNNER_TEMP/flutter/bin" >> "$GITHUB_PATH" - name: Install Flutter shell: bash - # Running "flutter doctor" will download Flutter's dependencies run: flutter doctor - + - name: Build Linux App shell: bash run: | flutter config --enable-linux-desktop source linux/prep.sh - flutter build linux --build-name ${{ inputs.VERSION_NAME }} --build-number ${{ inputs.VERSION_CODE }} + flutter build linux \ + --build-name "${{ inputs.VERSION_NAME }}" \ + --build-number "${{ inputs.VERSION_CODE }}" - name: Install fpm shell: bash run: | sudo apt-get install -y ruby ruby-dev build-essential sudo gem install --no-document fpm - + - name: Build .deb package shell: bash run: | fpm -s dir -t deb \ -n pslab \ - -v ${{ inputs.VERSION_NAME }} \ + -v "${{ inputs.VERSION_NAME }}" \ --prefix=/ \ --depends libusb-1.0-0 \ build/linux/arm64/release/bundle/bin/=/usr/bin \ @@ -69,7 +74,7 @@ runs: run: | fpm -s dir -t rpm \ -n pslab \ - -v ${{ inputs.VERSION_NAME }} \ + -v "${{ inputs.VERSION_NAME }}" \ --prefix=/ \ --depends libusb1 \ build/linux/arm64/release/bundle/bin/=/usr/bin \ @@ -83,4 +88,6 @@ runs: uses: actions/upload-artifact@v4 with: name: linux-packages-arm64 - path: "*.deb\n*.rpm" + path: | + *.deb + *.rpm \ No newline at end of file diff --git a/.github/actions/linux/action.yml b/.github/actions/linux/action.yml index 471d8af10..34ab5783b 100644 --- a/.github/actions/linux/action.yml +++ b/.github/actions/linux/action.yml @@ -17,7 +17,7 @@ runs: uses: subosito/flutter-action@v2 with: cache: true - flutter-version-file: pubspec.yaml + flutter-version-file: .flutter-version - name: Install dependencies shell: bash diff --git a/.github/actions/macos/action.yml b/.github/actions/macos/action.yml index 937ded2d8..dc535a139 100644 --- a/.github/actions/macos/action.yml +++ b/.github/actions/macos/action.yml @@ -17,7 +17,7 @@ runs: uses: subosito/flutter-action@v2 with: cache: false # TODO set to after https://github.com/actions/runner/issues/449 is fixed - flutter-version-file: pubspec.yaml + flutter-version-file: .flutter-version - name: Update Podfile shell: bash diff --git a/.github/actions/screenshot-android/action.yml b/.github/actions/screenshot-android/action.yml index 0e13c7f2d..14742294b 100644 --- a/.github/actions/screenshot-android/action.yml +++ b/.github/actions/screenshot-android/action.yml @@ -53,7 +53,7 @@ runs: uses: subosito/flutter-action@v2 with: cache: true - flutter-version-file: pubspec.yaml + flutter-version-file: .flutter-version - name: Create Android Screenshots uses: reactivecircus/android-emulator-runner@v2 diff --git a/.github/actions/screenshot-ipad/action.yml b/.github/actions/screenshot-ipad/action.yml index 00ba258f5..321411119 100644 --- a/.github/actions/screenshot-ipad/action.yml +++ b/.github/actions/screenshot-ipad/action.yml @@ -13,7 +13,7 @@ runs: uses: subosito/flutter-action@v2 with: cache: false # TODO set to after https://github.com/actions/runner/issues/449 is fixed - flutter-version-file: pubspec.yaml + flutter-version-file: .flutter-version - name: Update Podfile shell: bash diff --git a/.github/actions/screenshot-iphone/action.yml b/.github/actions/screenshot-iphone/action.yml index fceeb250d..7a5b77d73 100644 --- a/.github/actions/screenshot-iphone/action.yml +++ b/.github/actions/screenshot-iphone/action.yml @@ -13,7 +13,7 @@ runs: uses: subosito/flutter-action@v2 with: cache: false # TODO set to after https://github.com/actions/runner/issues/449 is fixed - flutter-version-file: pubspec.yaml + flutter-version-file: .flutter-version - name: Update Podfile shell: bash diff --git a/.github/actions/windows/action.yml b/.github/actions/windows/action.yml index d6a3ca5af..44cde5162 100644 --- a/.github/actions/windows/action.yml +++ b/.github/actions/windows/action.yml @@ -17,7 +17,7 @@ runs: uses: subosito/flutter-action@v2 with: cache: true - flutter-version-file: pubspec.yaml + flutter-version-file: .flutter-version - name: Build Windows App shell: pwsh diff --git a/.github/dependabot.yml b/.github/dependabot.yml index f27299660..f3cc02b6f 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -18,4 +18,4 @@ updates: - "/.github/actions/ios" - "/.github/actions/screenshot-android" schedule: - interval: "daily" \ No newline at end of file + interval: "daily" diff --git a/.github/workflows/flutter_upgrade.yml b/.github/workflows/flutter_upgrade.yml index aa2addb99..7ffd2e78c 100644 --- a/.github/workflows/flutter_upgrade.yml +++ b/.github/workflows/flutter_upgrade.yml @@ -13,48 +13,56 @@ jobs: - name: Checkout repository uses: actions/checkout@v5 - - name: Read Flutter version from pubspec.yaml + - name: Read current Flutter version id: read-version + shell: bash run: | - FLUTTER_VERSION=$(yq '.environment.flutter' pubspec.yaml) + FLUTTER_VERSION=$(cat .flutter-version) echo "Current Flutter version: $FLUTTER_VERSION" - echo "flutter_version=$FLUTTER_VERSION" >> $GITHUB_ENV + echo "FLUTTER_VERSION=$FLUTTER_VERSION" >> $GITHUB_ENV - name: Get latest stable Flutter version id: check-latest + shell: bash run: | - LATEST_VERSION=$(curl -s https://storage.googleapis.com/flutter_infra_release/releases/releases_linux.json | jq -r '.releases[] | select(.channel == "stable") | .version' | head -n 1) + LATEST_VERSION=$(curl -s https://storage.googleapis.com/flutter_infra_release/releases/releases_linux.json \ + | jq -r '.releases[] | select(.channel == "stable") | .version' \ + | head -n 1) echo "Latest stable Flutter version: $LATEST_VERSION" - echo "latest_flutter_version=$LATEST_VERSION" >> $GITHUB_ENV + echo "LATEST_VERSION=$LATEST_VERSION" >> $GITHUB_ENV - - name: Compare versions and update pubspec.yaml if needed + - name: Compare versions and update .flutter-version id: update-version + shell: bash run: | - if [ "$flutter_version" != "$latest_flutter_version" ]; then - echo "Updating Flutter version in pubspec.yaml..." - sed -i "s/flutter:\s*'${flutter_version}'/flutter: '${latest_flutter_version}'/" pubspec.yaml + if [ "$FLUTTER_VERSION" != "$LATEST_VERSION" ]; then + echo "Updating Flutter version..." + echo "$LATEST_VERSION" > .flutter-version git --no-pager diff - echo "update_needed=true" >> $GITHUB_ENV + echo "UPDATE_NEEDED=true" >> $GITHUB_ENV else - echo "Flutter is up to date." - echo "update_needed=false" >> $GITHUB_ENV + echo "Flutter is already up to date." + echo "UPDATE_NEEDED=false" >> $GITHUB_ENV fi - name: Commit and create PR if update is needed - if: env.update_needed == 'true' + if: env.UPDATE_NEEDED == 'true' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - git config --global user.name "dependabot[bot]" - git config --global user.email "49699333+dependabot[bot]@users.noreply.github.com" - - BRANCH_NAME="flutter-upgrade-${{ env.latest_flutter_version }}" - git checkout -b $BRANCH_NAME - git add pubspec.yaml - git commit -m "chore: Upgrade Flutter to ${{ env.latest_flutter_version }}" - git push origin -f $BRANCH_NAME - - PR_URL=$(gh pr create --title "chore(deps): upgrade Flutter to ${{ env.latest_flutter_version }}" \ - --body "This PR updates Flutter version in pubspec.yaml to the latest stable release." \ - --base flutter \ - --head $BRANCH_NAME) + shell: bash + run: | + git config --global user.name "github-actions[bot]" + git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" + + BRANCH_NAME="flutter-upgrade-${LATEST_VERSION}" + + git checkout -b "$BRANCH_NAME" + git add .flutter-version + git commit -m "chore: upgrade Flutter to ${LATEST_VERSION}" + git push origin "$BRANCH_NAME" + + gh pr create \ + --title "chore(deps): upgrade Flutter to ${LATEST_VERSION}" \ + --body "This PR updates the Flutter SDK version in .flutter-version to the latest stable release." \ + --base flutter \ + --head "$BRANCH_NAME" \ No newline at end of file diff --git a/pubspec.lock b/pubspec.lock index 3b38145a5..91b58a658 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -61,10 +61,10 @@ packages: dependency: transitive description: name: characters - sha256: faf38497bda5ead2a8c7615f4f7939df04333478bf32e4173fcb06d428b5716b + sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803 url: "https://pub.dev" source: hosted - version: "1.4.1" + version: "1.4.0" checked_yaml: dependency: transitive description: @@ -97,14 +97,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.2" - code_assets: - dependency: transitive - description: - name: code_assets - sha256: "83ccdaa064c980b5596c35dd64a8d3ecc68620174ab9b90b6343b753aa721687" - url: "https://pub.dev" - source: hosted - version: "1.0.0" collection: dependency: transitive description: @@ -293,10 +285,10 @@ packages: dependency: "direct main" description: name: fl_chart - sha256: "7ca9a40f4eb85949190e54087be8b4d6ac09dc4c54238d782a34cf1f7c011de9" + sha256: "577aeac8ca414c25333334d7c4bb246775234c0e44b38b10a82b559dd4d764e7" url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.0.0" flusbserial: dependency: "direct main" description: @@ -310,15 +302,6 @@ packages: description: flutter source: sdk version: "0.0.0" - flutter_audio_capture: - dependency: "direct main" - description: - path: "." - ref: master - resolved-ref: "6be37d6e10a628223a75b7ef14a0c61feab498a8" - url: "https://github.com/AsCress/flutter_audio_capture.git" - source: git - version: "1.1.8" flutter_driver: dependency: transitive description: flutter @@ -520,14 +503,6 @@ packages: url: "https://pub.dev" source: hosted version: "0.2.8" - hooks: - dependency: transitive - description: - name: hooks - sha256: "7a08a0d684cb3b8fb604b78455d5d352f502b68079f7b80b831c62220ab0a4f6" - url: "https://pub.dev" - source: hosted - version: "1.0.1" html: dependency: transitive description: @@ -561,7 +536,7 @@ packages: source: hosted version: "4.1.2" image: - dependency: transitive + dependency: "direct main" description: name: image sha256: f9881ff4998044947ec38d098bc7c8316ae1186fa786eddffdb867b9bc94dfce @@ -597,6 +572,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.5" + js: + dependency: transitive + description: + name: js + sha256: "53385261521cc4a0c4658fd0ad07a7d14591cf8fc33abbceae306ddb974888dc" + url: "https://pub.dev" + source: hosted + version: "0.7.2" json_annotation: dependency: transitive description: @@ -697,18 +680,18 @@ packages: dependency: transitive description: name: matcher - sha256: "12956d0ad8390bbcc63ca2e1469c0619946ccb52809807067a7020d57e647aa6" + sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 url: "https://pub.dev" source: hosted - version: "0.12.18" + version: "0.12.17" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: "9c337007e82b1889149c82ed242ed1cb24a66044e30979c44912381e9be4c48b" + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec url: "https://pub.dev" source: hosted - version: "0.13.0" + version: "0.11.1" meta: dependency: transitive description: @@ -741,14 +724,14 @@ packages: url: "https://pub.dev" source: hosted version: "4.7.0" - native_toolchain_c: - dependency: transitive + mp_audio_stream: + dependency: "direct main" description: - name: native_toolchain_c - sha256: "89e83885ba09da5fdf2cdacc8002a712ca238c28b7f717910b34bcd27b0d03ac" + name: mp_audio_stream + sha256: "078f9b9118056618707617bb6e853ac457389b9b90a7b5a75b90686aefdf2343" url: "https://pub.dev" source: hosted - version: "0.17.4" + version: "0.2.2" nested: dependency: transitive description: @@ -773,14 +756,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.0.2" - objective_c: - dependency: transitive - description: - name: objective_c - sha256: "100a1c87616ab6ed41ec263b083c0ef3261ee6cd1dc3b0f35f8ddfa4f996fe52" - url: "https://pub.dev" - source: hosted - version: "9.3.0" package_config: dependency: transitive description: @@ -849,10 +824,10 @@ packages: dependency: transitive description: name: path_provider_foundation - sha256: "2a376b7d6392d80cd3705782d2caa734ca4727776db0b6ec36ef3f1855197699" + sha256: "6d13aece7b3f5c5a9731eaf553ff9dcbc2eff41087fd2df587fd0fed9a3eb0c4" url: "https://pub.dev" source: hosted - version: "2.6.0" + version: "2.5.1" path_provider_linux: dependency: transitive description: @@ -1005,6 +980,70 @@ packages: url: "https://pub.dev" source: hosted version: "1.5.0" + record: + dependency: "direct main" + description: + name: record + sha256: d5b6b334f3ab02460db6544e08583c942dbf23e3504bf1e14fd4cbe3d9409277 + url: "https://pub.dev" + source: hosted + version: "6.2.0" + record_android: + dependency: transitive + description: + name: record_android + sha256: "94783f08403aed33ffb68797bf0715b0812eb852f3c7985644c945faea462ba1" + url: "https://pub.dev" + source: hosted + version: "1.5.1" + record_ios: + dependency: transitive + description: + name: record_ios + sha256: "8df7c136131bd05efc19256af29b2ba6ccc000ccc2c80d4b6b6d7a8d21a3b5a9" + url: "https://pub.dev" + source: hosted + version: "1.2.0" + record_linux: + dependency: transitive + description: + name: record_linux + sha256: c31a35cc158cd666fc6395f7f56fc054f31685571684be6b97670a27649ce5c7 + url: "https://pub.dev" + source: hosted + version: "1.3.0" + record_macos: + dependency: transitive + description: + name: record_macos + sha256: "084902e63fc9c0c224c29203d6c75f0bdf9b6a40536c9d916393c8f4c4256488" + url: "https://pub.dev" + source: hosted + version: "1.2.1" + record_platform_interface: + dependency: transitive + description: + name: record_platform_interface + sha256: "8a81dbc4e14e1272a285bbfef6c9136d070a47d9b0d1f40aa6193516253ee2f6" + url: "https://pub.dev" + source: hosted + version: "1.5.0" + record_web: + dependency: transitive + description: + name: record_web + sha256: "7e9846981c1f2d111d86f0ae3309071f5bba8b624d1c977316706f08fc31d16d" + url: "https://pub.dev" + source: hosted + version: "1.3.0" + record_windows: + dependency: transitive + description: + name: record_windows + sha256: "223258060a1d25c62bae18282c16783f28581ec19401d17e56b5205b9f039d78" + url: "https://pub.dev" + source: hosted + version: "1.0.7" retry: dependency: transitive description: @@ -1037,6 +1076,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.0.1" + serial: + dependency: "direct main" + description: + name: serial + sha256: "264e85ac2af4cdb3b16879992429ba8fb47b4ded1a06b8249b6f4357df855e2b" + url: "https://pub.dev" + source: hosted + version: "0.0.7+1" share_plus: dependency: "direct main" description: @@ -1230,26 +1277,26 @@ packages: dependency: transitive description: name: test - sha256: "54c516bbb7cee2754d327ad4fca637f78abfc3cbcc5ace83b3eda117e42cd71a" + sha256: "75906bf273541b676716d1ca7627a17e4c4070a3a16272b7a3dc7da3b9f3f6b7" url: "https://pub.dev" source: hosted - version: "1.29.0" + version: "1.26.3" test_api: dependency: transitive description: name: test_api - sha256: "93167629bfc610f71560ab9312acdda4959de4df6fac7492c89ff0d3886f6636" + sha256: ab2726c1a94d3176a45960b6234466ec367179b87dd74f1611adb1f3b5fb9d55 url: "https://pub.dev" source: hosted - version: "0.7.9" + version: "0.7.7" test_core: dependency: transitive description: name: test_core - sha256: "394f07d21f0f2255ec9e3989f21e54d3c7dc0e6e9dbce160e5a9c1a6be0e2943" + sha256: "0cc24b5ff94b38d2ae73e1eb43cc302b77964fbf67abad1e296025b78deb53d0" url: "https://pub.dev" source: hosted - version: "0.6.15" + version: "0.6.12" typed_data: dependency: transitive description: @@ -1427,7 +1474,7 @@ packages: source: hosted version: "1.2.1" web: - dependency: transitive + dependency: "direct main" description: name: web sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a" @@ -1515,5 +1562,5 @@ packages: source: hosted version: "3.1.3" sdks: - dart: ">=3.10.3 <4.0.0" - flutter: ">=3.41.1" + dart: ">=3.10.1 <4.0.0" + flutter: ">=3.38.0" diff --git a/pubspec.yaml b/pubspec.yaml index 3544dca22..0f504d0bc 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -20,7 +20,6 @@ version: 1.0.0+1 environment: sdk: ^3.5.4 - flutter: '3.41.2' # Dependencies specify other packages that your package needs in order to work. # To automatically upgrade your package dependencies to the latest versions @@ -40,7 +39,7 @@ dependencies: cupertino_icons: ^1.0.8 flutter_svg: ^2.2.0 google_fonts: ^8.0.2 - fl_chart: ^1.1.0 + fl_chart: 1.0.0 provider: ^6.1.5 usb_serial: ^0.5.0 get_it: ^9.2.1 @@ -62,7 +61,7 @@ dependencies: csv: ^7.1.0 share_plus: ^12.0.0 path_provider: ^2.1.5 - file_picker: ^10.3.2 + file_picker: ^10.3.9 flutter_screenutil: ^5.9.3 flusbserial: ^0.3.0 inno_bundle: ^0.11.2 @@ -162,4 +161,4 @@ flutter_launcher_icons: adaptive_icon_background: "#FFFFFF" adaptive_icon_foreground: "assets/icons/icon.png" adaptive_icon_monochrome: "assets/icons/icon.png" - adaptive_icon_foreground_inset: 22 \ No newline at end of file + adaptive_icon_foreground_inset: 22