Permalink
Browse files

Update travis conf for working with asdk r22 and gradle

  • Loading branch information...
1 parent 14436de commit e9fc02881995da803c56f8c6b5a9421db9af78dc Sergey Shatunov committed Jun 18, 2013
Showing with 62 additions and 6 deletions.
  1. +61 −5 .travis.yml
  2. +1 −1 build.gradle
View
66 .travis.yml
@@ -6,14 +6,70 @@ branches:
notifications:
email: false
+
+env:
+ global:
+ - ANDROID_SDK_VERSION="r22.0.1"
+ - ANDROID_BUILD_TOOLS_VERSION="r17"
+ - ANDROID_PLATFORM_TOOLS_VERSION="r17"
+
+jdk:
+ - openjdk7
before_install:
+ # Update a system for ia32 libraries
+ # Just full upgrade of system and installing a ia32-libs not works
+ # It's debian based system, /very/ stable version only
- sudo apt-get update -qq
- if [ `uname -m` = x86_64 ]; then sudo apt-get install -qq --force-yes libgd2-xpm ia32-libs ia32-libs-multiarch; fi
- - wget http://dl.google.com/android/android-sdk_r21-linux.tgz
- - tar -zxf android-sdk_r21-linux.tgz
+
+ # Base android sdk setup
+ - wget https://dl-ssl.google.com/android/android-sdk_${ANDROID_SDK_VERSION}-linux.tgz
+ - tar -zxf android-sdk_${ANDROID_SDK_VERSION}-linux.tgz
- export ANDROID_HOME=`pwd`/android-sdk-linux
- - export PATH=${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools:${PATH}
- - android update sdk --filter platform-tools,android-14 --no-ui --force
+ - export ANDROID_BUILD_TOOLS_HOME=${ANDROID_HOME}/build-tools/17.0.0
+ - export PATH=${ANDROID_BUILD_TOOLS_HOME}:${ANDROID_HOME}/tools:${PATH}
+
+ - export BASEDIR=`pwd`
+
+ # Build tools
+ # Zip from repository contains android-*.*.* folder inside,
+ # we are need only a content from it
+ - mkdir -p ${ANDROID_BUILD_TOOLS_HOME}
+ - cd ${ANDROID_BUILD_TOOLS_HOME}
+ - export FILE=build-tools_${ANDROID_BUILD_TOOLS_VERSION}-linux.zip
+ - wget https://dl-ssl.google.com/android/repository/${FILE}
+ - unzip -q ${FILE}
+ - rm ${FILE}
+ - export FILE=$(ls)
+ - mv ${FILE}/* .
+ - rmdir ${FILE}
+ - cd ${BASEDIR}
+
+ # Platform tools unneed for build, but i know Google - crazy peoples
+ # In case of fire uncomment lines below
+ #- export FILE=platform-tools_${ANDROID_BUILD_TOOLS_VERSION}-linux.zip
+ #- wget https://dl-ssl.google.com/android/repository/${FILE}
+ #- unzip -q ${FILE}
+ #- rm ${FILE}
+ #- export PATH=${ANDROID_HOME}/platform-tools:${PATH}
+
+ # Android SDK Platform API 14
+ - export FILE=android-14_r03.zip
+ - wget https://dl-ssl.google.com/android/repository/${FILE}
+ - mkdir -p ${ANDROID_HOME}/platforms
+ - unzip -q ${FILE} -d ${ANDROID_HOME}/platforms
+ - mv ${ANDROID_HOME}/platforms/android-4.0.2 ${ANDROID_HOME}/platforms/android-14
+ - rm ${FILE}
+
+ - unset FILE
+
+ # We are should update Gradle, because Android Build Tools works with 1.6,
+ # but on travis installed 1.4
+ - wget http://downloads.gradle.org/distributions/gradle-1.6-all.zip
+ - unzip -q -o gradle-1.6-all.zip
+ - export PATH="${BASEDIR}/gradle-1.6/bin:${PATH}"
-script: echo Tests skipped
+ # Let's try to build...
+install: gradle build
+script: gradle check
View
2 build.gradle
@@ -4,7 +4,7 @@ buildscript {
}
dependencies {
- classpath 'com.android.tools.build:gradle:0.4'
+ classpath 'com.android.tools.build:gradle:0.4.2'
}
}

0 comments on commit e9fc028

Please sign in to comment.