Skip to content

Instantly share code, notes, and snippets.

@JoaquimLey
Last active August 14, 2016 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JoaquimLey/1211f2326c3e5334d9e80c3f9f49f1d0 to your computer and use it in GitHub Desktop.
Save JoaquimLey/1211f2326c3e5334d9e80c3f9f49f1d0 to your computer and use it in GitHub Desktop.
Travis config for Android
language: android
jdk:
# Jdk version used by your project
- oraclejdk8
sudo: false
android:
components:
- platform-tools
- tools
# The BuildTools version used by your project
- build-tools-24.0.0
- android-24
- extra-android-m2repository
- extra-google-m2repository
- extra-android-support
- extra-google-google_play_services
# Specify at least one system image, if you need to run emulator(s) during your tests
- sys-img-armeabi-v7a-android-24
notifications:
email: false
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
# cache between builds
cache:
directories:
- $HOME/.m2
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
install:
# Check install section: http://docs.travis-ci.com/user/build-configuration/#install
# If you'd like to skip the install stage entirely, set it to true and nothing will be run.
- true
before_script:
- chmod +x gradlew
- echo no | android create avd --force --name test --target android-24 --abi armeabi-v7a
- emulator -avd test -no-skin -no-audio -no-window -no-boot-anim &
- android-wait-for-emulator
- adb shell input keyevent 82 &
#Build, and run tests
script:
# Once tests written should run the gradle task for both Mobile and Wear
# currently only doing a normal build to test Travis config
#- ./gradlew core:unitTests
#- ./gradlew mobile:functionalTests
#- ./gradlew wear:functionalTests
- ./gradlew mobile:build # as an example
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment