Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions tool/github.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ ls $JAVA_HOME
echo "export PATH=$JAVA_HOME/bin:\$PATH"
export PATH=$JAVA_HOME/bin:$PATH

# Clone and configure Flutter to the latest stable release
git clone --depth 1 https://github.com/flutter/flutter.git ../flutter
# Download and configure Flutter to the pinned stable release if not present
source ./tool/provision_flutter.sh
export PATH="$PATH":`pwd`/../flutter/bin:`pwd`/../flutter/bin/cache/dart-sdk/bin
flutter config --no-analytics
flutter doctor
Expand Down
4 changes: 2 additions & 2 deletions tool/kokoro/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ setup() {

export JAVA_OPTS=" -Djava.net.preferIPv4Stack=false -Djava.net.preferIPv6Addresses=true"

# Clone and configure Flutter to the latest stable release
git clone --depth 1 https://github.com/flutter/flutter.git ../flutter
Comment thread
pq marked this conversation as resolved.
# Download and configure Flutter to the pinned stable release if not present
source ./tool/provision_flutter.sh
export PATH="$PATH":`pwd`/../flutter/bin:`pwd`/../flutter/bin/cache/dart-sdk/bin
flutter config --no-analytics
flutter doctor
Expand Down
26 changes: 26 additions & 0 deletions tool/provision_flutter.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash
# Copyright 2026 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

# Fail on any error.
set -e

# Provision the pinned Flutter SDK if not present
if [ ! -d "../flutter" ]; then
OS_NAME=$(uname -s | tr '[:upper:]' '[:lower:]')
FLUTTER_VERSION="3.41.0"
Comment thread
pq marked this conversation as resolved.

echo "Provisioning Flutter SDK version ${FLUTTER_VERSION} for ${OS_NAME}..."
if [ "$OS_NAME" = "darwin" ]; then
curl -fLO "https://storage.googleapis.com/flutter_infra_release/releases/stable/macos/flutter_macos_${FLUTTER_VERSION}-stable.zip"
unzip -q "flutter_macos_${FLUTTER_VERSION}-stable.zip" -d ../
rm "flutter_macos_${FLUTTER_VERSION}-stable.zip"
else
curl -fLO "https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_${FLUTTER_VERSION}-stable.tar.xz"
tar xf "flutter_linux_${FLUTTER_VERSION}-stable.tar.xz" -C ../
rm "flutter_linux_${FLUTTER_VERSION}-stable.tar.xz"
fi
else
echo "../flutter already exists, skipping download."
fi
Loading