Skip to content

Commit

Permalink
Fetch flutter repository through script
Browse files Browse the repository at this point in the history
  • Loading branch information
HalidOdat committed Sep 19, 2024
1 parent 4ca68cb commit 0596316
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 14 deletions.
16 changes: 2 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:
workflow_dispatch:

env:
FLUTTER_VERSION: 3.24.0
JAVA_VERSION: 17
# https://github.com/android-actions/setup-android?tab=readme-ov-file#sdk-version-selection
CMDLINE_TOOLS_VERSION: 10406996 # 11.0
Expand Down Expand Up @@ -54,17 +53,6 @@ jobs:
- name: Access Android SDK build-tools
run: echo "$ANDROID_HOME/build-tools"/*/ | awk -F' ' '{ print $1 }' >> $GITHUB_PATH

# Maybe use flutter-version-file, see: https://github.com/subosito/flutter-action
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
flutter-version: ${{ env.FLUTTER_VERSION }}

- name: Disable Flutter analytics
run: flutter config --no-analytics

# Cache the directory
- name: Cache directory
uses: actions/cache@v3
Expand All @@ -90,8 +78,8 @@ jobs:
export ZERO_AR_DATE=1
cd app
flutter build apk --release --split-per-abi
flutter build apk --release
./flutter build apk --release --split-per-abi
./flutter build apk --release
- name: Archive mappings
working-directory: ${{ env.BUILD_PATH }}
Expand Down
3 changes: 3 additions & 0 deletions app/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ migrate_working_dir/
.pub/
/build/

# flutter repository
.flutter

# Symbolication related
app.*.symbols

Expand Down
15 changes: 15 additions & 0 deletions app/flutter
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/sh

VERSION=3.24.0

APP_DIR="$( cd "$( dirname "$0" )" && pwd )"
FLUTTER_DIR="$APP_DIR/.flutter"

if [ -e "$FLUTTER_DIR" ]; then
exec "$FLUTTER_DIR"/bin/flutter $@
fi

git clone "--filter=tree:0" https://github.com/flutter/flutter "$FLUTTER_DIR" --branch "$VERSION"

"$FLUTTER_DIR"/bin/flutter config --no-analytics
exec "$FLUTTER_DIR"/bin/flutter $@

0 comments on commit 0596316

Please sign in to comment.