Skip to content

Commit f94bc56

Browse files
committed
Refactor Android NDK installation script
1 parent 3104c10 commit f94bc56

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

ci/android-install-ndk.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@
1111

1212
set -ex
1313

14-
curl --retry 10 -O https://dl.google.com/android/repository/android-ndk-r19c-linux-x86_64.zip
15-
unzip -q android-ndk-r19c-linux-x86_64.zip
14+
NDK=android-ndk-r19c
15+
API=26
16+
curl --retry 10 -O https://dl.google.com/android/repository/${NDK}-linux-x86_64.zip
17+
unzip -q ${NDK}-linux-x86_64.zip
1618

1719
case "$1" in
1820
aarch64)
@@ -28,9 +30,9 @@ case "$1" in
2830
;;
2931
esac;
3032

31-
android-ndk-r19c/build/tools/make_standalone_toolchain.py \
33+
${NDK}/build/tools/make_standalone_toolchain.py \
3234
--install-dir "/android/ndk-${1}" \
3335
--arch "${arch}" \
34-
--api 26
36+
--api ${API}
3537

36-
rm -rf ./android-ndk-r15b-linux-x86_64.zip ./android-ndk-r15b
38+
rm -rf ./${NDK}-linux-x86_64.zip ./${NDK}

ci/android-install-sdk.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@ set -ex
1818
# located in https://github.com/appunite/docker by just wrapping it in a script
1919
# which apparently magically accepts the licenses.
2020

21+
SDK=4333796
2122
mkdir sdk
22-
curl --retry 10 https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip -O
23-
unzip -d sdk sdk-tools-linux-4333796.zip
23+
curl --retry 10 https://dl.google.com/android/repository/sdk-tools-linux-${SDK}.zip -O
24+
unzip -d sdk sdk-tools-linux-${SDK}.zip
2425

2526
case "$1" in
2627
arm | armv7)

0 commit comments

Comments
 (0)