File tree Expand file tree Collapse file tree 1 file changed +3
-20
lines changed
Expand file tree Collapse file tree 1 file changed +3
-20
lines changed Original file line number Diff line number Diff line change @@ -58,31 +58,14 @@ jobs:
5858 - name : Install Android platform tools
5959 shell : bash
6060 run : |
61- set -euxo pipefail
61+ set -eux
6262 if ! command -v sdkmanager >/dev/null 2>&1; then
6363 echo "sdkmanager executable is required" >&2
6464 exit 1
6565 fi
6666
67- SDKMANAGER="$(command -v sdkmanager)"
68-
69- run_sdk() {
70- set +o pipefail
71- local rc
72- if arch -arm64 true 2>/dev/null; then
73- yes | arch -arm64 "$SDKMANAGER" "$@" >/dev/null 2>&1
74- rc=${PIPESTATUS[2]}
75- else
76- yes | "$SDKMANAGER" "$@" >/dev/null 2>&1
77- rc=${PIPESTATUS[1]}
78- fi
79- set -o pipefail
80- return $rc
81- }
82-
83- run_sdk --licenses
84- run_sdk --install "platform-tools" "build-tools;34.0.0"
85- run_sdk --install "platforms;android-33" || echo "Warning: failed to install Android 33 platform" >&2
67+ yes 2>/dev/null | sdkmanager --licenses >/dev/null
68+ yes 2>/dev/null | sdkmanager --install "platform-tools" "build-tools;34.0.0" "platforms;android-33" >/dev/null
8669
8770 if [ -n "${ANDROID_HOME:-}" ] && [ -d "${ANDROID_HOME}/platform-tools" ]; then
8871 echo "${ANDROID_HOME}/platform-tools" >> "$GITHUB_PATH"
You can’t perform that action at this time.
0 commit comments