From 6a200f72e1b42496f5bab230a3b5ec25a18b9f0b Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Fri, 19 Oct 2018 15:49:55 +0200 Subject: [PATCH] Ensure all Android components are always installed Ensure that even if the Android SDK is already unpacked we install and update all packages required. Otherwise if the sdk is we only updated the available packages list and did not update the packages themselves. --- scripts/android/build-sdk | 39 ++++++++++++++++++--------------------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/scripts/android/build-sdk b/scripts/android/build-sdk index f8a8b95b..01f1a495 100755 --- a/scripts/android/build-sdk +++ b/scripts/android/build-sdk @@ -15,31 +15,28 @@ fi if [ -d "$SDK" ]; then echo "Android SDK already exists at $SDK. Doing only update" - yes | $SDK/tools/bin/sdkmanager --licenses - $SDK/tools/bin/sdkmanager --update - exit 0 +else + . $O3/core/deps/functions.sh + + FNAME=sdk-tools-linux-3859397.zip + URL=https://dl.google.com/android/repository/${FNAME} + CSUM=444e22ce8ca0f67353bda4b85175ed3731cae3ffa695ca18119cbacef1c1bea0 + + download + + cd $DEP_DIR + rm -rf android-sdk + mkdir android-sdk + + . $O3/core/vars/android-sdk-path + + cd $SDK + unzip $DL/$FNAME fi -. $O3/core/deps/functions.sh - -FNAME=sdk-tools-linux-3859397.zip -URL=https://dl.google.com/android/repository/${FNAME} -CSUM=444e22ce8ca0f67353bda4b85175ed3731cae3ffa695ca18119cbacef1c1bea0 - -download - -cd $DEP_DIR -rm -rf android-sdk -mkdir android-sdk - -. $O3/core/vars/android-sdk-path - -cd $SDK -unzip $DL/$FNAME - yes | $SDK/tools/bin/sdkmanager --licenses $SDK/tools/bin/sdkmanager --update -$SDK/tools/bin/sdkmanager 'build-tools;26.0.2' \ +$SDK/tools/bin/sdkmanager --install 'build-tools;26.0.2' \ 'ndk-bundle' \ 'extras;android;m2repository' \ 'patcher;v4' \