Skip to content

Commit

Permalink
Merge pull request #61 from navit-gps/Android_build_trim
Browse files Browse the repository at this point in the history
Android build cleanup
  • Loading branch information
jandegr committed Dec 29, 2015
2 parents cb9e043 + 6b93380 commit 4e93b84
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 98 deletions.
91 changes: 2 additions & 89 deletions ci/build_android.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,15 @@ export ANDROID_TOOLS_CHECK=$ANDROID_SDK"/tools"

export ANDROID_PLATFORM_TOOLS_CHECK=$ANDROID_SDK"/platform-tools"

export ANDROID_BUILD_TOOLS="21.1.2"
export ANDROID_BUILD_TOOLS="23.0.1"
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_CHECK_MIN=$ANDROID_SDK"/platforms/"$ANDROID_PLATFORM_MIN"/images"
export ANDROID_PLATFORM_CHECK_MAX=$ANDROID_SDK"/platforms/"$ANDROID_PLATFORM_LATEST"/images"

export BUILD_PATH=$START_PATH"/android-build"
export ANDROID_ENV=$ANDROID_NDK_BIN:$ANDROID_SDK_TOOLS:$ANDROID_SDK_PLATFORM_TOOLS

export SDK_ADD_FILTER="platform-tool,tools,build-tools-21.0.1,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"

export SDK_UPD_FILTER="platform-tool,tools,build-tools-21.0.1,extra-android-m2repository,extra-android-support"

mkdir $ANDROID_HOME
# $ANDROID_HOME is /usr/local/android-sdk-linux for the android env. provided by CircleCI

# If path already has our environment no need to set it
if echo "$ANDROID_ENV" | grep -q "$PATH"; then
Expand All @@ -46,86 +39,6 @@ else
echo
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

updateSDK
mkdir -p $BUILD_PATH
cd $BUILD_PATH
export PATH=$ANDROID_NDK_BIN:$ANDROID_SDK_TOOLS:$ANDROID_SDK_PLATFORM_TOOLS:$PATH
Expand Down
9 changes: 0 additions & 9 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
machine:
environment:
ANDROID_HOME: /home/ubuntu/android
ANDROID_NDK_HOME: /home/ubuntu/android/android-ndk
ANDROID_SDK_CDN: https://dl.google.com/android
ANDROID_SDK_FILE: android-sdk_r24.4.1-linux.tgz
ANDROID_NDK_CDN: http://dl.google.com/android/ndk
ANDROID_NDK_FILE: android-ndk-r10e-linux-x86_64.bin
CMAKE_FILE: ../Toolchain/arm-eabi.cmake
dependencies:
cache_directories:
Expand All @@ -19,7 +13,6 @@ dependencies:
- sudo apt-get update
- sudo apt-get install cmake
- sudo apt-get install libpng12-dev
# - sudo apt-get install libgtk2.0-dev
- sudo apt-get install librsvg2-bin
- sudo apt-get install libfreetype6-dev
- sudo apt-get install libdbus-glib-1-dev
Expand All @@ -31,8 +24,6 @@ dependencies:
- cp bin/po/navit.pot $CIRCLE_ARTIFACTS/
- "[ $CIRCLE_PROJECT_USERNAME != navit-gps ] || curl \"https://translations.launchpad.net/navit/${CIRCLE_BRANCH}/+translations-upload\" -H \"$lp_cookie\" -H \"Referer: https://translations.launchpad.net/navit/${CIRCLE_BRANCH}/+translations-upload\" -F file=@bin/po/navit.pot | grep title"
# Android build
- wget -c -N -q $ANDROID_SDK_CDN/$ANDROID_SDK_FILE -O $ANDROID_HOME/$ANDROID_SDK_FILE
- wget -c -N -q $ANDROID_NDK_CDN/$ANDROID_NDK_FILE -O $ANDROID_HOME/$ANDROID_NDK_FILE
- sudo apt-get install gettext
- sudo apt-get install openjdk-8-jdk
- sudo apt-get install ant
Expand Down

0 comments on commit 4e93b84

Please sign in to comment.