ndk+ci: Upgrade to use CrystaX NDK 10.3.1 and a more recent version of Crypto++ library
This commit also fixes checks with Travis-CI that were effectively broken before.
Change-Id: Ibf9e54de47db00ed01534187a19a3d40e9dee84e
diff --git a/.jenkins.d/10-get-ndk.sh b/.jenkins.d/10-get-ndk.sh
index 07f1942..4b66ca6 100755
--- a/.jenkins.d/10-get-ndk.sh
+++ b/.jenkins.d/10-get-ndk.sh
@@ -2,10 +2,12 @@
set -e
set -x
-URL=https://www.crystax.net/download/
-NDK=crystax-ndk-10.2.1
+CRYSTAX_NDK_VERSION=10.3.1
-NDK_FILE="$NDK-linux-x86_64.tar.bz2"
+URL=https://www.crystax.net/download/
+NDK=crystax-ndk-$CRYSTAX_NDK_VERSION
+
+NDK_FILE="$NDK-linux-x86_64.tar.xz"
if [ ! -f downloads/$NDK_FILE ]; then
mkdir downloads || true
@@ -15,8 +17,28 @@
fi
if [ ! -d $NDK ]; then
+ export XZ_DEFAULTS=--memlimit=300MiB
echo -en 'travis_fold:start:NDK\r'
- pv -f downloads/$NDK_FILE | tar xjf -
+
+ # To save space
+ EXCLUDES="toolchains/*-clang3.6 toolchains/*-3.6 \
+ toolchains/*-clang3.7 \
+ toolchains/*-3.7 \
+ toolchains/*-4.9 \
+ sources/cxx-stl/gabi++ \
+ sources/cxx-stl/llvm-libc++ \
+ sources/cxx-stl/llvm-libc++abi \
+ sources/cxx-stl/stlport \
+ sources/cxx-stl/llvm-libc++ \
+ sources/cxx-stl/gnu-libstdc++/4.9 \
+ sources/icu \
+ sources/boost/*/libs/*/gnu-4.9 \
+ sources/boost/*/libs/*/llvm-3.6 \
+ sources/boost/*/libs/*/llvm-3.7 \
+ sources/objc \
+ sources/python"
+
+ pv -f downloads/$NDK_FILE | tar xJf - $(for i in $EXCLUDES; do echo "--exclude $i"; done | xargs)
echo -en 'travis_fold:end:NDK\r'
fi
diff --git a/.jenkins.d/10-get-sdk.sh b/.jenkins.d/10-get-sdk.sh
old mode 100644
new mode 100755
index 4b801dd..fef1aaa
--- a/.jenkins.d/10-get-sdk.sh
+++ b/.jenkins.d/10-get-sdk.sh
@@ -2,25 +2,31 @@
set -e
set -x
-SDK_TOOLS_VERSION=24.0.2
+GRADLE_VERSION=2.10
+SDK_VERSION=24.4.1
BUILD_TOOLS_VERSION=21.1.2
COMPILE_SDK_VERSION=21
-export ANDROID_HOME=`pwd`/android-sdk-linux
-export PATH=${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools
-export PATH=$PATH:`pwd`/gradle-2.9/bin
+SDK=android-sdk-linux
-if [ ! -d android-sdk-linux ]; then
- wget -q http://dl.google.com/android/android-sdk_r24.0.2-linux.tgz
- tar zxf android-sdk_r24.0.2-linux.tgz
- rm android-sdk_r24.0.2-linux.tgz
+export ANDROID_HOME=`pwd`/$SDK
+export PATH=${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools
+
+if [ ! -d $SDK ]; then
+ wget -nv http://dl.google.com/android/android-sdk_r$SDK_VERSION-linux.tgz
+ tar zxf android-sdk_r$SDK_VERSION-linux.tgz
+ rm android-sdk_r$SDK_VERSION-linux.tgz
echo "y" | android update sdk --filter platform-tools,build-tools-$BUILD_TOOLS_VERSION,android-$COMPILE_SDK_VERSION,extra-android-support,extra-android-m2repository,extra-google-m2repository --no-ui --all --force
echo "y" | android update sdk --filter "android-19" --no-ui --all --force
fi
-wget -q https://services.gradle.org/distributions/gradle-2.9-bin.zip
-unzip gradle-2.9-bin.zip
-rm gradle-2.9-bin.zip
+if [ ! -d gradle-$GRADLE_VERSION ]; then
+ wget -nv https://services.gradle.org/distributions/gradle-$GRADLE_VERSION-bin.zip
+ unzip gradle-$GRADLE_VERSION-bin.zip
+ rm gradle-$GRADLE_VERSION-bin.zip
-echo sdk.dir=`pwd`/android-sdk-linux >> local.properties
+ ln -s `pwd`/gradle-$GRADLE_VERSION/bin/gradle gradle
+fi
+
+echo sdk.dir=`pwd`/$SDK >> local.properties