summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ci/build_android.sh163
1 files changed, 81 insertions, 82 deletions
diff --git a/ci/build_android.sh b/ci/build_android.sh
index 76db88d11..8925593e8 100644
--- a/ci/build_android.sh
+++ b/ci/build_android.sh
@@ -6,7 +6,7 @@ off='\e[0m'
# setup var's to perform environment setup and cmake
export START_PATH=~/
-export SOURCE_PATH=$START_PATH"/"${CIRCLE_PROJECT_REPONAME}"/navit/"
+export SOURCE_PATH=$START_PATH"/"${CIRCLE_PROJECT_REPONAME}"/"
export CMAKE_FILE=$SOURCE_PATH"/Toolchain/arm-eabi.cmake"
export NDK_SUFFIX="r10d"
@@ -25,7 +25,7 @@ export ANDROID_BUILD_TOOLS="21.1.2"
export ANDROID_BUILD_CHECK=$ANDROID_SDK"/build-tools/"$BUILD_TOOLS
export ANDROID_PLATFORM_LATEST="android-21"
-export ANDROID_PLATFORM_MIN="android-7"
+export ANDROID_PLATFORM_MIN="android-10"
export ANDROID_PLATFORM_CHECK_MIN=$ANDROID_SDK"/platforms/"$ANDROID_PLATFORM_MIN"/images"
export ANDROID_PLATFORM_CHECK_MAX=$ANDROID_SDK"/platforms/"$ANDROID_PLATFORM_LATEST"/images"
@@ -48,89 +48,88 @@ else
echo
fi
-mkdir -p $BUILD_PATH
-
-function extractSDK {
- echo -e -n "${yel}" " Unpacking Android SDK... "
-
- cd $ANDROID_HOME
-
- $(tar -xf $ANDROID_SDK_FILE -C $ANDROID_HOME)
-
- if [ $? -eq 0 ]; then {
- echo -e "${grn}" "SUCCEEDED" "${off}"
- }
- else
- {
- echo -e "${red}" "FAILED" "${off}"
- exit 1
- }
- fi
-}
-
-function extractNDK {
- echo -e -n "${yel}" " Unpacking Android NDK... "
-
- cd $ANDROID_HOME
- chmod +x ./android-ndk-r10d-linux-x86_64.bin
- ./android-ndk-r10d-linux-x86_64.bin
-
- if [ $? -eq 0 ]; then {
- echo -e "${grn}" "SUCCEEDED" "${off}"
- }
- else
- {
- echo -e "${red}" "FAILED" "${off}"
- exit 1
- }
- fi
-}
-
-
-if [ ! -d $ANDROID_SDK ]; then {
- echo -e -n "${yel}" " Android SDK downloading... "
- extractSDK
-}
-else {
- echo -e "${grn}" " Android SDK Found " "${off}"
-}
-fi
-
-if [ ! -d $ANDROID_NDK_BIN ]; then {
- echo -e -n "${yel}" " Android NDK downloading... "
- extractNDK
-}
-else {
- echo -e "${grn}" " Android NDK Found " "${off}"
-}
-fi
-
-function addSDK {
- export ADD_SDK="echo y|android update sdk --no-ui --all --filter $SDK_ADD_FILTER"
- $ADD_SDK
-}
-
-function updateSDK {
- export UPD_SDK="echo y|android update sdk --no-ui --filter $SDK_UPD_FILTER"
-echo $UPD_SDK
- $UPD_SDK
-}
-
-if [ ! -d $ANDROID_PLATFORM_CHECK_MIN ]; then {
- echo -e -n "${yel}" " Android SDK Platform ... MISSING, downloading may take a very long time... "
- echo y|android update sdk --no-ui --all --filter platform-tool,tools,build-tools-21.1.2,extra-android-m2repository,extra-android-support,android-10,sysimg-10,addon-google_apis-google-10,android-9,addon-google_apis-google-9,android-21,sysimg-21,addon-google_apis-google-21
-
- echo -e "${grn}" "SUCCEEDED" "${off}"
-}
-else {
- echo -e -n "${grn}" " Android SDK Platform ..." "${off}"
- updateSDK
- echo -e "${grn}" "VERIFIED" "${off}"
-}
-fi
+#function extractSDK {
+# echo -e -n "${yel}" " Unpacking Android SDK... "
+#
+# cd $ANDROID_HOME
+#
+# $(tar -xf $ANDROID_SDK_FILE -C $ANDROID_HOME)
+#
+# if [ $? -eq 0 ]; then {
+# echo -e "${grn}" "SUCCEEDED" "${off}"
+# }
+# else
+# {
+# echo -e "${red}" "FAILED" "${off}"
+# exit 1
+# }
+# fi
+#}
+#
+#function extractNDK {
+# echo -e -n "${yel}" " Unpacking Android NDK... "
+#
+# cd $ANDROID_HOME
+# chmod +x ./android-ndk-r10d-linux-x86_64.bin
+# ./android-ndk-r10d-linux-x86_64.bin
+#
+# if [ $? -eq 0 ]; then {
+# echo -e "${grn}" "SUCCEEDED" "${off}"
+# }
+# else
+# {
+# echo -e "${red}" "FAILED" "${off}"
+# exit 1
+# }
+# fi
+#}
+#
+#
+#if [ ! -d $ANDROID_SDK ]; then {
+# echo -e -n "${yel}" " Android SDK downloading... "
+# extractSDK
+#}
+#else {
+# echo -e "${grn}" " Android SDK Found " "${off}"
+#}
+#fi
+#
+#if [ ! -d $ANDROID_NDK_BIN ]; then {
+# echo -e -n "${yel}" " Android NDK downloading... "
+# extractNDK
+#}
+#else {
+# echo -e "${grn}" " Android NDK Found " "${off}"
+#}
+#fi
+#
+#function addSDK {
+# export ADD_SDK="echo y|android update sdk --no-ui --all --filter $SDK_ADD_FILTER"
+# $ADD_SDK
+#}
+#
+#function updateSDK {
+# export UPD_SDK="echo y|android update sdk --no-ui --filter $SDK_UPD_FILTER"
+#echo $UPD_SDK
+# $UPD_SDK
+#}
+#
+#if [ ! -d $ANDROID_PLATFORM_CHECK_MIN ]; then {
+# echo -e -n "${yel}" " Android SDK Platform ... MISSING, downloading may take a very long time... "
+# echo y|android update sdk --no-ui --all --filter platform-tool,tools,build-tools-21.1.2,extra-android-m2repository,extra-android-support,android-10,sysimg-10,addon-google_apis-google-10,android-9,addon-google_apis-google-9,android-21,sysimg-21,addon-google_apis-google-21
+#
+# echo -e "${grn}" "SUCCEEDED" "${off}"
+#}
+#else {
+# echo -e -n "${grn}" " Android SDK Platform ..." "${off}"
+# updateSDK
+# echo -e "${grn}" "VERIFIED" "${off}"
+#}
+#fi
mkdir -p $BUILD_PATH
cd $BUILD_PATH
+export PATH=$ANDROID_NDK_BIN:$ANDROID_SDK_TOOLS:$ANDROID_SDK_PLATFORM_TOOLS:$PATH
cmake -DCMAKE_TOOLCHAIN_FILE=$CMAKE_FILE -DCACHE_SIZE='(20*1024*1024)' -DAVOID_FLOAT=1 -DANDROID_API_VERSION=9 $SOURCE_PATH
make && make apkg || exit 1
mv navit/android/bin/Navit-debug.apk $CIRCLE_ARTIFACTS/navit-$CIRCLE_SHA1-debug.apk