summaryrefslogtreecommitdiff
path: root/buildscripts
diff options
context:
space:
mode:
authorGabriel Russell <gabriel.russell@mongodb.com>2019-04-01 15:29:17 -0400
committerGabriel Russell <gabriel.russell@mongodb.com>2019-04-25 14:43:45 -0400
commit24d4a296aacf4acc981094f5cdf973ad62ab67fa (patch)
treeec6a720a604c709cc4d38bceb25f7353052748eb /buildscripts
parentfdc3712e4cb89c23451061b4c927a78340269d89 (diff)
downloadmongo-24d4a296aacf4acc981094f5cdf973ad62ab67fa.tar.gz
SERVER-39465 upgrade android toolchain to r19c
Diffstat (limited to 'buildscripts')
-rwxr-xr-xbuildscripts/setup-android-toolchain.sh44
1 files changed, 18 insertions, 26 deletions
diff --git a/buildscripts/setup-android-toolchain.sh b/buildscripts/setup-android-toolchain.sh
index 2d944029e2c..9d2f5f08151 100755
--- a/buildscripts/setup-android-toolchain.sh
+++ b/buildscripts/setup-android-toolchain.sh
@@ -3,46 +3,38 @@
set -o verbose
set -o errexit
-ToolchainArch=$1
-shift
-API_VERSION=$1
+SDK_ROOT=$1
+if [ -z $SDK_ROOT ]; then
+ echo "usage: $0 <sdk-root>"
+ exit 1
+fi
shift
-if [ -z "$PYTHON" ] ; then
- PYTHON=`which python`
-fi
+NDK=android-ndk-r19c
+NDK_PACKAGE=$NDK-linux-x86_64.zip
+# The releases of the sdk tools are published at
+# https://developer.android.com/studio/releases/sdk-tools
+SDK_PACKAGE=sdk-tools-linux-4333796.zip # 26.1.1
+
+test -e $SDK_PACKAGE || curl -O https://dl.google.com/android/repository/$SDK_PACKAGE
+test -e $NDK_PACKAGE || curl -O https://dl.google.com/android/repository/$NDK_PACKAGE
-SDK_ROOT=$PWD/android_sdk
if [ ! -e $SDK_ROOT ]; then
mkdir $SDK_ROOT
(
cd $SDK_ROOT
- SDK_PACKAGE=sdk-tools-linux-4333796.zip
- test -e $SDK_PACKAGE || curl -O https://dl.google.com/android/repository/$SDK_PACKAGE
- unzip -q $SDK_PACKAGE
+ unzip -q ../$SDK_PACKAGE
yes | ./tools/bin/sdkmanager --channel=0 \
- "platforms;android-28" \
+ "build-tools;28.0.0" \
"emulator" \
"patcher;v4" \
+ "platforms;android-28" \
"platform-tools" \
- "build-tools;28.0.0" \
- "system-images;android-21;google_apis;armeabi-v7a" \
"system-images;android-24;google_apis;arm64-v8a" \
- "system-images;android-21;google_apis;x86_64" \
+ "system-images;android-24;google_apis;armeabi-v7a" \
+ "system-images;android-24;google_apis;x86_64" \
| grep -v Unzipping
)
- NDK=android-ndk-r18b
- NDK_PACKAGE=$NDK-linux-x86_64.zip
- test -e $NDK_PACKAGE || curl -O https://dl.google.com/android/repository/$NDK_PACKAGE
unzip -q $NDK_PACKAGE
mv $NDK $SDK_ROOT/ndk-bundle
fi
-
-TOOLCHAIN=$PWD/android_toolchain-${ToolchainArch}-${API_VERSION}
-rm -rf $TOOLCHAIN
-
-$PYTHON $SDK_ROOT/ndk-bundle/build/tools/make_standalone_toolchain.py --arch $ToolchainArch --api $API_VERSION --stl=libc++ --install-dir $TOOLCHAIN
-
-echo SDK_ROOT=${SDK_ROOT}
-echo TOOLCHAIN=${TOOLCHAIN}
-echo API_VERSION=${API_VERSION}