summaryrefslogtreecommitdiffstats
path: root/packaging/android/android-build-wrapper.sh
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2019-01-20 02:31:24 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-01-21 17:10:17 +1200
commit51e44d48464a5bfd15af485ab12cf4297b6f5fcc (patch)
treeb9c2bb6eb75e72ee46ab9db009bf0970664b0ca8 /packaging/android/android-build-wrapper.sh
parent0f87a7073be4ec35bcfe78f67084ea6983c95b32 (diff)
downloadsubsurface-51e44d48464a5bfd15af485ab12cf4297b6f5fcc.tar.gz
Android: make sure we have the correct platforms installed
This should fix the current Travis build failures for Android. It is odd how we have ANDROID_PLATFORM and ANDROID_PLATFORMS, buf for now all I care about is that the Travis build completes. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'packaging/android/android-build-wrapper.sh')
-rwxr-xr-xpackaging/android/android-build-wrapper.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/packaging/android/android-build-wrapper.sh b/packaging/android/android-build-wrapper.sh
index 5da08b533..47c7d2fcb 100755
--- a/packaging/android/android-build-wrapper.sh
+++ b/packaging/android/android-build-wrapper.sh
@@ -77,7 +77,9 @@ if [ ! -d "$ANDROID_NDK" ] ; then
unzip -q "$NDK_BINARIES"
fi
-if [ ! -d "$ANDROID_SDK"/build-tools/"${ANDROID_BUILDTOOLS_REVISION}" ] ; then
+if [ ! -d "$ANDROID_SDK"/build-tools/"${ANDROID_BUILDTOOLS_REVISION}" ] ||
+ [ ! -d "$ANDROID_SDK"/platforms/android-"${ANDROID_PLATFORMS}" ] ||
+ [ ! -d "$ANDROID_SDK"/platforms/android-"${ANDROID_PLATFORM}" ] ; then
if [ ! -d "$ANDROID_SDK" ] ; then
if [ ! -f "$SDK_TOOLS" ] ; then
wget -q https://dl.google.com/android/repository/"$SDK_TOOLS"
@@ -87,11 +89,11 @@ if [ ! -d "$ANDROID_SDK"/build-tools/"${ANDROID_BUILDTOOLS_REVISION}" ] ; then
unzip -q ../"$SDK_TOOLS"
yes | tools/bin/sdkmanager --licenses > /dev/null 2>&1 || echo "d56f5187479451eabf01fb78af6dfcb131a6481e" > licenses/android-sdk-license
cat licenses/android-sdk-license
- tools/bin/sdkmanager tools platform-tools 'platforms;'"${ANDROID_PLATFORMS}" 'build-tools;'"${ANDROID_BUILDTOOLS_REVISION}"
+ yes | tools/bin/sdkmanager tools platform-tools 'platforms;'"${ANDROID_PLATFORM}" 'platforms;'"${ANDROID_PLATFORMS}" 'build-tools;'"${ANDROID_BUILDTOOLS_REVISION}" > /dev/null
echo ""
else
pushd "$ANDROID_SDK"
- tools/bin/sdkmanager tools platform-tools 'platforms;'"${ANDROID_PLATFORMS}" 'build-tools;'"${ANDROID_BUILDTOOLS_REVISION}"
+ yes | tools/bin/sdkmanager tools platform-tools 'platforms;'"${ANDROID_PLATFORM}" 'platforms;'"${ANDROID_PLATFORMS}" 'build-tools;'"${ANDROID_BUILDTOOLS_REVISION}" > /dev/null
fi
popd
fi