Travis Android: When changing NDK, recompile dependencies

An NDK change wipes the Cache so all dependencies need to be rebuild. The following steps have the correct order but the detection had it wrong.
This commit is contained in:
Christian Beer 2018-12-08 10:58:43 +01:00
parent 8cde576efe
commit 28e0592867
1 changed files with 13 additions and 11 deletions

View File

@ -111,7 +111,20 @@ if [ "${doclean}" = "yes" ]; then
fi
export COMPILEOPENSSL="no"
export COMPILECURL="no"
export NDK_FLAGFILE="$PREFIX/NDK-${NDK_VERSION}-${arch}_done"
CURL_FLAGFILE="$PREFIX/curl-${CURL_VERSION}_done"
OPENSSL_FLAGFILE="$PREFIX/openssl-${OPENSSL_VERSION}_done"
if [ ! -e "${NDK_FLAGFILE}" ]; then
rm -rf "${PREFIX}/${arch}"
rm -f "${CURL_FLAGFILE}" "${OPENSSL_FLAGFILE}"
wget -O /tmp/ndk.zip https://dl.google.com/android/repository/android-ndk-r${NDK_VERSION}-linux-x86_64.zip
unzip -qq /tmp/ndk.zip -d $HOME
touch "${NDK_FLAGFILE}"
fi
export NDK_ROOT=$HOME/android-ndk-r${NDK_VERSION}
if [ ! -e "${OPENSSL_FLAGFILE}" ]; then
wget -O /tmp/openssl.tgz https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz
tar xzf /tmp/openssl.tgz --directory=$BUILD_DIR
@ -120,8 +133,6 @@ if [ ! -e "${OPENSSL_FLAGFILE}" ]; then
fi
export OPENSSL_SRC=$BUILD_DIR/openssl-${OPENSSL_VERSION}
export COMPILECURL="no"
CURL_FLAGFILE="$PREFIX/curl-${CURL_VERSION}_done"
if [ ! -e "${CURL_FLAGFILE}" ]; then
wget -O /tmp/curl.tgz https://curl.haxx.se/download/curl-${CURL_VERSION}.tar.gz
tar xzf /tmp/curl.tgz --directory=$BUILD_DIR
@ -130,15 +141,6 @@ if [ ! -e "${CURL_FLAGFILE}" ]; then
fi
export CURL_SRC=$BUILD_DIR/curl-${CURL_VERSION}
export NDK_FLAGFILE="$PREFIX/NDK-${NDK_VERSION}-${arch}_done"
if [ ! -e "${NDK_FLAGFILE}" ]; then
rm -rf "${PREFIX}/${arch}"
wget -O /tmp/ndk.zip https://dl.google.com/android/repository/android-ndk-r${NDK_VERSION}-linux-x86_64.zip
unzip -qq /tmp/ndk.zip -d $HOME
touch "${NDK_FLAGFILE}"
fi
export NDK_ROOT=$HOME/android-ndk-r${NDK_VERSION}
export ANDROID_TC=$PREFIX
case "$arch" in