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
28 changes: 15 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
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:
- 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
- export ANDROID_HOME="$HOME"/android-sdk
- mkdir -p "$ANDROID_HOME"
- export ANDROID_SDK_FILE_NAME=sdk-tools-darwin-3859397.zip
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why darwin? travis runs on linux right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, facepalm, now I'm curious how it works in other projects where I did same thing… I guess Android tooling is more or less crossplatform now, that's how you check that lol

- 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"'
- echo no | android create avd --force -n test -t android-18 --abi armeabi-v7a
- emulator -avd test -no-audio -no-window &

Expand Down