Twidere-App-Android-Twitter.../.travis.yml

91 lines
2.3 KiB
YAML

language: android
dist: trusty
sudo: required
jdk: oraclejdk8
android:
components:
- tools
- tools # To fix https://github.com/travis-ci/travis-ci/issues/6040
- platform-tools
- build-tools-26.0.0
- android-26
# Additional components
- extra-google-google_play_services-41
- extra-google-m2repository-54
- extra-android-m2repository-47.0.0
licenses:
- 'android-sdk-preview-license-.+'
- 'android-sdk-license-.+'
- 'google-gdk-license-.+'
env:
global:
# COMPONENT_GOOGLE_REPO
- secure: "OQ/wkORxY2qv4CmAdMxyW4ihRt5GRyxKxQRZpsdjMbwIKf3DlY6vBoNIEQ46sRRLAKOzkQ3LirodbWRCBlDN9WFw4XRsLTveqqtslMGeLf04peazXMIa6rJ22BCDGEmnzRNx6r3JRb9wEK1plNv4u4G9DgQ7ShzbwdZ8A5grlg8="
addons:
apt:
packages:
- curl
- tar
- gzip
- patch
- openssh-client
- git
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
- $HOME/.m2/
before_install:
- yes y | $ANDROID_HOME/tools/bin/sdkmanager --update
- yes y | $ANDROID_HOME/tools/bin/sdkmanager --licenses
- ./travis/scripts/decode_private_configs.sh
install:
- ./travis/scripts/fetch_private_files.sh
before_script:
# Validate if patches work
- ./travis/scripts/patch_sources.sh
# Validate if Google components fetched successfully
- ./travis/scripts/test_private_files.sh
script:
- ./gradlew clean build --stacktrace --no-daemon
after_failure:
- ./travis/scripts/upload_error_logs.sh
deploy:
- provider: releases
prerelease: true
api_key:
secure: "WKtKwda3hegqO9QVujdonNoL2ESJUR80WHNq/13wDsbCABo/GNnuqHNYZmml3wAifEKKeCEYfNZRUuHQ8eHs54Lj5BlGRX5i+1LrGhhgnVFQgmrhIv4RJuVQ663kDEh+Jwo4vowJ2mxNDvLvOhfZwxjULPDiknqy6u5PyW3id5M="
file_glob: true
file: '**/*-release.apk'
on:
repo: TwidereProject/Twidere-Android
tags: true
# Publish to Google Play store
- provider: script
script: ./gradlew publishGoogleRelease
on:
repo: TwidereProject/Twidere-Android
tags: true
# Upload common component library to Bintray
- provider: script
script: ./gradlew twidere.component.common:bintrayUpload
on:
repo: TwidereProject/Twidere-Android
tags: true