You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
1014 B
38 lines
1014 B
|
|
#!/bin/bash |
|
|
|
set -e |
|
|
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" |
|
|
|
source "$SCRIPT_DIR/dev.env" |
|
|
|
# Download and setup Flutter |
|
cd /tmp/ |
|
curl -v -o flutter.tar.xz https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_${FLUTTER_VERSION}-stable.tar.xz |
|
tar xf flutter.tar.xz -C /tmp/ |
|
mkdir -p 2>/dev/null ${FLUTTER_ROOT}/ ||: |
|
mv /tmp/flutter/{.*,*} ${FLUTTER_ROOT}/ |
|
rm flutter.tar.xz |
|
|
|
# Configure git |
|
git config --global --add safe.directory ${FLUTTER_ROOT} |
|
|
|
# Configure Flutter |
|
flutter config --no-analytics |
|
flutter config --no-enable-android |
|
flutter config --no-enable-ios |
|
flutter config --no-enable-windows-desktop |
|
flutter config --no-enable-macos-desktop |
|
flutter config --enable-linux-desktop |
|
flutter config --enable-web |
|
|
|
# Pre-download binaries and verify installation |
|
flutter precache --linux --web |
|
flutter doctor |
|
flutter --version |
|
|
|
# Build demo project |
|
"$FLUTTER_SAMPLE_PROJECT/build.sh" |
|
|
|
echo "Flutter development environment setup completed successfully!"
|
|
|