Skip to content
This repository has been archived by the owner on Oct 3, 2024. It is now read-only.

Commit

Permalink
[#8] configure travis to attach apk to releases
Browse files Browse the repository at this point in the history
  • Loading branch information
lfuelling committed Jun 14, 2019
1 parent 9413312 commit 0b2f088
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 15 deletions.
20 changes: 16 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,22 @@ android:
- extra-android-m2repository
- addon-google_apis-google-28
- sys-img-armeabi-v7a-android-24

env:
global:
- ADB_INSTALL_TIMEOUT=8

- ADB_INSTALL_TIMEOUT=8
script:
- ./gradlew build -S
- "./gradlew build -S"
- "./gradlew assembleRelease"
before_install:
- openssl aes-256-cbc -K $encrypted_9246cef756ee_key -iv $encrypted_9246cef756ee_iv
-in keystore.jks.enc -out keystore.jks -d
deploy:
provider: releases
overwrite: true
file_glob: true
api_key:
secure: nI1YMrhRqtk9Zs4eXmZOrmwUB+vq9RHnNH9b2M1q71PVH62vCeMwlsDwtPEG0zHViVv7awZ42ogKKsj3HI0N8Nnt/sA2Cw8lRynfgvABWJ3npqZkStiiI0hT1OdnZD/MtUeMyh03lgPvpB6lhVHNPYrMqbTxYMFOa4lX6HG7f5GELALFtv2of0XXBfX5Qty0T0V3G48FIfVKmz/5jxLRkY7eJU4WmQ4wFsuH/UvaiF6pLw4yIMvrBKfKQxjy/JH049Jc+tidySsnYnxgb/rO08fVtuQjfoo1xdzskpek/QwyazhisxFVYvAEnVpFTbmQHuZKwRqTtPEF0WhL2oRNKaqxJFxxt/YKuOrc0tRF5BEHfvyuJ1lOOjPYhmNi2joCq4DlALZNDVHqfk8ftIzNoS/p2NHbTRkFFbTwBQpIPXfxCQl4JpZB157JdgubcPSohXzupZ/E6IXUgmNJmFgi7oEPm7EgZTqMeXpw07nWyue5lrcF+GZJEM9D63keqchMXSNIZWVLc1r5hExx0rryTry8nD2cGpnxR8IEZX8cBC9HjJj6I1iq4OtVDCh15NZ75+BIRr4la3SJosbCOsB/xFuNXARc1jhDCPVxckcOIeU0gIbQsXJ1SWMvhMalZ0uSopQkzfzsu1bKnu5mvun3Q40qYwiREp6nFqqFtYUbjYY=
file: /home/travis/build/lfuelling/lrkFM/app/build/outputs/apk/release/*.apk
on:
repo: lfuelling/lrkFM
tags: true
24 changes: 13 additions & 11 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,25 @@ android {
}
}
signingConfigs {
release {
//keyAlias System.getenv("APK_KEY_ALIAS")
//keyPassword System.getenv("APK_KEY_PASSWORD")
//def filePath = System.getenv("APK_STORE_FILE")
//if (filePath != null) {
// storeFile file(filePath)
//}
//storePassword System.getenv("APK_STORE_PASSWORD")
}
release
}
buildTypes {
release {
minifyEnabled false // doesn't work with some apache stuff
//signingConfig signingConfigs.release
//proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
}

def isRunningOnTravis = System.getenv("CI") == "true"

if (isRunningOnTravis) {
signingConfigs.release.storeFile = file("../keystore.jks")
signingConfigs.release.storePassword = System.getenv("keystore_password")
signingConfigs.release.keyAlias = System.getenv("keystore_alias")
signingConfigs.release.keyPassword = System.getenv("keystore_password")
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
Expand Down
Binary file added keystore.jks.enc
Binary file not shown.

0 comments on commit 0b2f088

Please sign in to comment.