Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Travis CI build. #547

Merged
merged 7 commits into from
Oct 30, 2017
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