Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 15 additions & 6 deletions .github/workflows/flutter_project_codecheck_android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,24 @@ jobs:
distribution: 'zulu'
java-version: ${{ env.java_version }}

- name: '[Setup - Flutter Actions with Cache]'
- name: '[Setup - Cache Flutter and Pub Dependencies]'
uses: actions/cache@v4
id: cache
with:
path: |
/home/runner/.pub-cache
/opt/hostedtoolcache/flutter
key: ${{ runner.os }}-flutter-${{ env.flutter_version }}-${{ hashFiles('pubspec.lock') }}
restore-keys: ${{ runner.os }}-flutter-${{ env.flutter_version }}-

- name: '[Setup - Flutter SDK]'
if: steps.cache.outputs.cache-hit != 'true'
uses: subosito/flutter-action@v2
with:
channel: 'stable'
flutter-version: ${{ env.flutter_version }}
cache: true
cache: false
architecture: x64
cache-key: 'flutter-:os:-:channel:-:version:-:arch:'
cache-path: '${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:'

# Make sure we have latest FVM
- name: '[FVM - Install]'
Expand Down Expand Up @@ -72,8 +81,8 @@ jobs:
run: fvm flutter analyze

# Build is slightly faster when targeting single platform, debug version and only apk instead of appbundle
- name: '[Flutter - Build APK]'
run: fvm flutter build apk -t lib/main_staging.dart --flavor staging --target-platform android-arm64 --obfuscate --split-debug-info=build/app/outputs/symbols --debug
# - name: '[Flutter - Build APK]'
# run: fvm flutter build apk -t lib/main_staging.dart --flavor staging --target-platform android-arm64 --obfuscate --split-debug-info=build/app/outputs/symbols --debug

# Only on self hosted. Cleanup the files after the build
# - name: '[Finish - Cleanup]'
Expand Down