86 lines
2.3 KiB
YAML
86 lines
2.3 KiB
YAML
language: android
|
|
|
|
android:
|
|
components:
|
|
- tools
|
|
- platform-tools
|
|
- build-tools-25.0.2
|
|
- android-25
|
|
|
|
# Additional components
|
|
- extra-google-google_play_services
|
|
- extra-google-m2repository
|
|
- extra-android-m2repository
|
|
|
|
licenses:
|
|
- 'android-sdk-preview-license-.+'
|
|
- 'android-sdk-license-.+'
|
|
- 'google-gdk-license-.+'
|
|
|
|
sudo: false
|
|
|
|
jdk:
|
|
- oraclejdk8
|
|
|
|
env:
|
|
global:
|
|
# COMPONENT_GOOGLE_REPO
|
|
- secure: "OQ/wkORxY2qv4CmAdMxyW4ihRt5GRyxKxQRZpsdjMbwIKf3DlY6vBoNIEQ46sRRLAKOzkQ3LirodbWRCBlDN9WFw4XRsLTveqqtslMGeLf04peazXMIa6rJ22BCDGEmnzRNx6r3JRb9wEK1plNv4u4G9DgQ7ShzbwdZ8A5grlg8="
|
|
|
|
addons:
|
|
apt:
|
|
packages:
|
|
- oracle-java8-installer
|
|
- 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:
|
|
- openssl aes-256-cbc -K $encrypted_9b8203f9524d_key -iv $encrypted_9b8203f9524d_iv -in travis/configs/twidere_private_config.tar.gz.enc -out travis/configs/twidere_private_config.tar.gz -d
|
|
|
|
install:
|
|
# Extracts build configs into source tree
|
|
- tar zxf travis/configs/twidere_private_config.tar.gz
|
|
# Make sure ~/.ssh/ exists
|
|
- mkdir -p ~/.ssh/
|
|
# Make it secure
|
|
- chmod 700 ~/.ssh/
|
|
# Append ssh_config
|
|
- cat private/ssh_config >> ~/.ssh/config
|
|
# Append known_hosts
|
|
- cat private/ssh_known_hosts >> ~/.ssh/known_hosts
|
|
# Checkout Google components
|
|
- ssh-agent bash -c "ssh-add private/ssh_id_rsa; git clone $COMPONENT_GOOGLE_REPO twidere/src/google" > /dev/null 2>&1
|
|
# Remove Google components .git dir
|
|
- rm -rf twidere/src/google/.git
|
|
|
|
before_script:
|
|
# Validate if patches work
|
|
- patch --dry-run -d twidere < twidere/patches/remove_closed_source_dependencies.patch
|
|
# Validate if Google components fetched successfully
|
|
- test -f twidere/src/google/AndroidManifest.xml
|
|
|
|
script:
|
|
- ./gradlew --no-daemon clean build
|
|
|
|
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 |