File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed
Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change 5959 shell : bash
6060 run : |
6161 set -euxo pipefail
62- yes | sdkmanager --install "platform-tools" "build-tools;34.0.0" >/dev/null
63- yes | sdkmanager --licenses >/dev/null
62+ if ! command -v sdkmanager >/dev/null 2>&1; then
63+ echo "sdkmanager executable is required" >&2
64+ exit 1
65+ fi
66+
67+ SDKMANAGER="$(command -v sdkmanager)"
68+
69+ run_sdk() {
70+ set +o pipefail
71+ yes | "$SDKMANAGER" "$@" >/dev/null 2>&1
72+ local rc=${PIPESTATUS[1]}
73+ set -o pipefail
74+ return $rc
75+ }
76+
77+ run_sdk --licenses
78+ run_sdk --install "platform-tools" "build-tools;34.0.0"
79+ run_sdk --install "platforms;android-33" || echo "Warning: failed to install Android 33 platform" >&2
6480 if [ -n "${ANDROID_HOME:-}" ] && [ -d "${ANDROID_HOME}/platform-tools" ]; then
6581 echo "${ANDROID_HOME}/platform-tools" >> "$GITHUB_PATH"
6682 fi
You can’t perform that action at this time.
0 commit comments