diff --git a/.travis.yml b/.travis.yml index 4be7cf3..b8908aa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,9 @@ -# We still need android to get the build tools/support libraries -language: android +language: java +env: + - COMPONENTS="tools,platform-tools,build-tools-21.1.1,android-21,extra-android-m2repository,extra-android-support,extra-google-m2repository" + +before_script: + - ./android_install.sh $COMPONENTS script: - ./gradlew test diff --git a/android_install.sh b/android_install.sh new file mode 100644 index 0000000..a39adda --- /dev/null +++ b/android_install.sh @@ -0,0 +1,14 @@ +#!/bin/bash - + +wget http://dl.google.com/android/android-sdk_r23.0.2-linux.tgz +tar xf android-sdk_r23.0.2-linux.tgz +cd android-sdk-linux/ +export ANDROID_HOME=`pwd` + +COMPONENT_ARRAY=$(echo $COMPONENTS | tr "," "\n") +for COMP in $COMPONENT_ARRAY +do + echo "yes" | tools/android update sdk -u -a -t $COMP +done + +cd - diff --git a/setup_js_build.sh b/setup_js_build.sh deleted file mode 100755 index d5228ac..0000000 --- a/setup_js_build.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/bash - -#=============================================================================== -# -# FILE: setup_js_build.sh -# -# USAGE: ./setup_js_build.sh -# -# DESCRIPTION: Set up a Linux host for building MinimalBible. It is possible -# to do in Windows, but Linux is scriptable. -# -# OPTIONS: --- -# REQUIREMENTS: --- -# BUGS: --- -# NOTES: --- -# AUTHOR: YOUR NAME (), -# ORGANIZATION: -# CREATED: 09/01/2014 15:19 -# REVISION: --- -#=============================================================================== - -set -o nounset # Treat unset variables as an error - -# Check for apt. This could be done with RPM, but I don't have access to a -# computer for it. -if [ `which apt-get` == "" ]; then - echo "Building on Redhat/RPM is not currently supported." - exit 1 -fi - -# We need root before doing anything else -if [ $UID != 0 ]; then - sudo bash "$0" - exit $? -fi - -# We don't really need Node, npm is enough. -apt-get install npm - -# Gulp needs a global install -npm install -g gulp - -# And run the rest of everything as the user who invoked sudo -sudo -u $SUDO_USER npm install diff --git a/wait_for_emulator b/wait_for_emulator deleted file mode 100644 index 207f028..0000000 --- a/wait_for_emulator +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -bootanim="" -failcounter=0 -until [[ "$bootanim" =~ "stopped" ]]; do - bootanim=`adb -e shell getprop init.svc.bootanim 2>&1` - echo "$bootanim" - if [[ "$bootanim" =~ "not found" ]]; then - let "failcounter += 1" - if [[ $failcounter -gt 3 ]]; then - echo "Failed to start emulator" - exit 1 - fi - fi - sleep 1 -done -echo "Done" \ No newline at end of file