Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct script for flutter build #2149

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
20 changes: 11 additions & 9 deletions sample-build-scripts/flutter/android-build/appcenter-post-clone.sh
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
#!/usr/bin/env bash
#Place this script in project/android/app/

cd ..
#!/usr/bin/env bash
set -ex

PROJECT_DIR=$(dirname $(dirname $(pwd)))

# fail if any command fails
set -e
# debug log
set -x
mkdir ~/dev && cd $_

cd ..
git clone -b beta https://github.com/flutter/flutter.git
git clone -b stable https://github.com/flutter/flutter.git
export PATH=`pwd`/flutter/bin:$PATH

flutter channel stable
flutter channel stable && flutter upgrade
flutter doctor

echo "Installed flutter to `pwd`/flutter"

# Go to project directory
cd $PROJECT_DIR

# build APK
# if you get "Execution failed for task ':app:lintVitalRelease'." error, uncomment next two lines
# flutter build apk --debug
Expand All @@ -30,4 +32,4 @@ flutter build apk --release
mkdir -p android/app/build/outputs/apk/; mv build/app/outputs/apk/release/app-release.apk $_

# copy the AAB where AppCenter will find it
#mkdir -p android/app/build/outputs/bundle/; mv build/app/outputs/bundle/release/app-release.aab $_
#mkdir -p android/app/build/outputs/bundle/; mv build/app/outputs/bundle/release/app-release.aab $_