Add travis script

This commit is contained in:
Jannis Mattheis
2018-11-02 14:22:09 +01:00
parent 8af40c3fd3
commit f867d8af5b
2 changed files with 54 additions and 0 deletions

54
.travis.yml Normal file
View File

@@ -0,0 +1,54 @@
language: android
sudo: required
jdk: openjdk8
notifications:
email: false
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/.android/build-cache
android:
components:
- tools
- platform-tools
- build-tools-28.0.3
- android-28
- extra-google-m2repository
- extra-android-m2repository
licenses:
- android-sdk-preview-license-.+
- android-sdk-license-.+
- google-gdk-license-.+
before_install:
- yes | sdkmanager "platforms;android-28"
- openssl aes-256-cbc -K $encrypted_f6e0f94759d3_key -iv $encrypted_f6e0f94759d3_iv
-in gotify-release-key.jks.enc -out gotify-release-key.jks -d
script:
- ./gradlew clean build --stacktrace
before_deploy:
- cp $TRAVIS_BUILD_DIR/gotify-release-key.jks $HOME
- cd app/build/outputs/apk/release
- jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore $HOME/gotify-release-key.jks
-storepass $STOREPASS -keypass $KEYPASS app-release-unsigned.apk gotify-release-key
- jarsigner -verify app-release-unsigned.apk
- "${ANDROID_HOME}/build-tools/28.0.3/zipalign -v 4 app-release-unsigned.apk Gotify.apk"
deploy:
provider: releases
file: Gotify.apk
api_key: $GH_TOKEN
skip_cleanup: true
on:
repo: gotify/android
tags: true
jdk: openjdk8

BIN
gotify-release-key.jks.enc Normal file

Binary file not shown.