.travis.yml
language: android
dist: trusty
android:
components:
# Uncomment the lines below if you want to
# use the latest revision of Android SDK Tools
# - tools
# - platform-tools
# The BuildTools version used by your project
- build-tools-29.0.2
# The SDK version used to compile your project
- android-29
# Additional components
- extra-google-google_play_services
- extra-google-m2repository
- extra-android-m2repository
# Specify at least one system image,
# if you need to run emulator(s) during your tests
- sys-img-x86-android-29
script:
- android list target
- ./gradlew clean build
- ./gradlew test
- ./gradlew assembleDebug
after_success:
- wget https://raw.githubusercontent.com/DiscordHooks/travis-ci-discord-webhook/master/send.sh
- chmod +x send.sh
- ./send.sh success $WEBHOOK_URL
after_failure:
- wget https://raw.githubusercontent.com/DiscordHooks/travis-ci-discord-webhook/master/send.sh
- chmod +x send.sh
- ./send.sh failure $WEBHOOK_URL
deploy:
provider: releases
api-key: $GITHUB_API_TOKEN_DEPLOYMENT
file: $TRAVIS_BUILD_DIR/app/build/outputs/apk/debug/app-debug.apk
skip_cleanup: true
body: Automatic build of $TRAVIS_BRANCH ($TRAVIS_COMMIT) built by Travis CI on $(date +'%F %T %Z').
prerelease: true
overwrite: true
target_commitish: $TRAVIS_COMMIT
on:
tags: false
branch: master
after_deploy:
- rm -rf $TRAVIS_BUILD_DIR/app/build/outputs