Skip to content

Commit

Permalink
Fix Travis CI build. (#547)
Browse files Browse the repository at this point in the history
  • Loading branch information
artem-zinnatullin authored and kageiit committed Oct 30, 2017
1 parent 9b12f7d commit b37b3a4
Showing 1 changed file with 22 additions and 15 deletions.
37 changes: 22 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,35 @@
sudo: true

language: android
language: java
jdk: oraclejdk8

dist: precise

android:
components:
- tools
- platform-tools
- tools
- build-tools-26.0.0
- android-26
- extra-android-m2repository

before_script:
before_install:
- export SKIP_OKBUCK=true
- export EXTRA_OKBUCK_ARGS="--quiet --stacktrace"
- mkdir -p $ANDROID_HOME/licenses
- echo $android_sdk_license > $ANDROID_HOME/licenses/android-sdk-license
- echo $android_sdk_preview_license > $ANDROID_HOME/licenses/android-sdk-preview-license
- echo no | android create avd --force -n test -t android-18 --abi armeabi-v7a
- export ANDROID_HOME="$HOME"/android-sdk
- mkdir -p "$ANDROID_HOME"
- export ANDROID_SDK_FILE_NAME=sdk-tools-linux-3859397.zip
- sudo apt-get update -q
- sudo apt-get install -y curl unzip
- curl --fail https://dl.google.com/android/repository/$ANDROID_SDK_FILE_NAME --silent --location --output $ANDROID_SDK_FILE_NAME
- unzip -qq $ANDROID_SDK_FILE_NAME -d "$ANDROID_HOME"
- rm $ANDROID_SDK_FILE_NAME
- export ANDROID_SDK_INSTALL_COMPONENT="echo \"y\" | \"$ANDROID_HOME\"/tools/bin/sdkmanager > /dev/null"
- eval $ANDROID_SDK_INSTALL_COMPONENT '"tools"'
- eval $ANDROID_SDK_INSTALL_COMPONENT '"platform-tools"'
- eval $ANDROID_SDK_INSTALL_COMPONENT '"build-tools;26.0.0"'
- eval $ANDROID_SDK_INSTALL_COMPONENT '"platforms;android-26"'
- eval $ANDROID_SDK_INSTALL_COMPONENT '"extras;android;m2repository"'
- eval $ANDROID_SDK_INSTALL_COMPONENT '"system-images;android-18;default;armeabi-v7a"'
- export PATH="$PATH:$ANDROID_HOME/tools/bin:$ANDROID_HOME/platform-tools:$ANDROID_HOME/emulator"
- echo no | avdmanager create avd -f -n test -k "system-images;android-18;default;armeabi-v7a"
- emulator -avd test -no-audio -no-window &

install:
- echo "Override default Travis install step to avoid unnecessary './gradlew assemble'."

script:
- SKIP_OKBUCK= ./buckw --version
- ./buckw targets --type android_binary java_test groovy_test robolectric_test kotlin_test scala_test | xargs ./buckw build -v 0
Expand Down

0 comments on commit b37b3a4

Please sign in to comment.