Skip to content

Instantly share code, notes, and snippets.

@danhantao
Last active August 29, 2015 14:00
Show Gist options
  • Save danhantao/a77cd7c5faa6e487d787 to your computer and use it in GitHub Desktop.
Save danhantao/a77cd7c5faa6e487d787 to your computer and use it in GitHub Desktop.
自动构建
# http://docs.travis-ci.com/user/build-configuration/
sudo apt-get install ruby
sudo apt-get install ruby-dev
gem -v
sudo gem install rubygems-update
sudo update_rubygems
sudo gem install travis
# android
language: java
jdk: oraclejdk7
notifications:
email: false
before_install:
- 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 > /dev/null; fi
- wget https://dl.google.com/android/adt/22.6.2/adt-bundle-linux-x86_64-20140321.zip
- unzip -q adt-bundle-linux-x86_64-20140321.zip
- mv adt-bundle-linux-x86_64-20140321 android-sdk-linux
- export ANDROID_HOME=$PWD/android-sdk-linux/sdk
- export PATH=${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools
******************************************************************************************************************************
# Do you accept the license 'android-sdk-license-bcbbd656' [y/n]
# https://github.com/embarkmobile/android-sdk-installer
sudo apt-get install expect
wget https://raw.githubusercontent.com/embarkmobile/android-sdk-installer/master/accept-licenses
chmod u+x accept-licenses
./accept-licenses "android -s update sdk -f --filter android-16 --no-ui --force" "android-sdk-license-bcbbd656"
# ctrl + a return home
# http://stackoverflow.com/questions/4681697/is-there-a-way-to-automate-the-android-sdk-installation
# ( sleep 5 && while [ 1 ]; do sleep 1; echo y; done ) | android update sdk --no-ui --filter platform-tool,android-19,sysimg-19,build-tools-19.0.1
# http://stackoverflow.com/questions/23160152/using-travis-for-making-android-builds
# echo yes | android update sdk --
# > /dev/null log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment