diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 699ab307f..4954ac06f 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -41,22 +41,36 @@ jobs: with: path: ~/.pub-cache key: ubuntu-pub-${{ hashFiles('**/pubspec.lock') }} - restore-keys: | - ubuntu-pub- + restore-keys: ubuntu-pub- - name: Cache build_runner (Optional) uses: actions/cache@v3 with: path: .dart_tool/build - key: ubuntu-build-runner-${{ hashFiles('**/*.dart') }} - restore-keys: | - ubuntu-build-runner- + key: ubuntu-build-runner-${{ hashFiles('lib/api/model/**/*.dart') }} + restore-keys: ubuntu-build-runner- + + - name: Cache Gradle + uses: actions/cache@v3 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ubuntu-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: ubuntu-gradle- + + - name: Cache CMake + uses: actions/cache@v3 + with: + path: /usr/local/lib/android/sdk/cmake + key: ubuntu-android-cmake + restore-keys: ubuntu-android-cmake- - name: Install dependencies run: flutter pub get - name: Prebuild with build_runner - run: dart run build_runner build --delete-conflicting-outputs + run: dart run build_runner build - name: Build apk run: | diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 613ba3a1f..bbf64ee53 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -31,29 +31,24 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Switch Xcode - run: sudo xcode-select -s /Applications/Xcode_16.4.app + - name: Setup Flutter + uses: subosito/flutter-action@v2 + with: + flutter-version: ${{ env.FLUTTER_VERSION }} - - name: Cache Flutter SDK + - name: Cache Pub Packages uses: actions/cache@v3 with: path: ~/.pub-cache key: macos-pub-${{ hashFiles('**/pubspec.lock') }} - restore-keys: | - macos-pub- - - - name: Setup Flutter - uses: subosito/flutter-action@v2 - with: - flutter-version: ${{ env.FLUTTER_VERSION }} + restore-keys: macos-pub- - name: Cache build_runner (Optional) uses: actions/cache@v3 with: path: .dart_tool/build - key: macos-build-runner-${{ hashFiles('**/*.dart') }} - restore-keys: | - macos-build-runner- + key: macos-build-runner-${{ hashFiles('lib/api/model/**/*.dart') }} + restore-keys: macos-build-runner- - name: Cache CocoaPods Pods uses: actions/cache@v3 @@ -78,7 +73,7 @@ jobs: pod install - name: Prebuild with build_runner - run: dart run build_runner build --delete-conflicting-outputs + run: dart run build_runner build - name: Build iOS App and IPA run: |