2019-12-09 02:27:54 +01:00
|
|
|
language: android
|
|
|
|
dist: xenial
|
2020-05-24 02:12:28 +02:00
|
|
|
# Disable building on tags
|
|
|
|
if: tag IS blank
|
2019-12-09 02:27:54 +01:00
|
|
|
android:
|
|
|
|
components:
|
|
|
|
- android-29
|
2019-12-09 02:34:07 +01:00
|
|
|
- build-tools-28.0.3
|
2020-01-04 03:37:50 +01:00
|
|
|
before_script:
|
2020-01-28 14:11:38 +01:00
|
|
|
- yes | sdkmanager "ndk-bundle"
|
|
|
|
- export ANDROID_NDK_ROOT=$ANDROID_HOME/ndk-bundle
|
|
|
|
- export ANDROID_NDK_HOME=$ANDROID_NDK_ROOT
|
2020-01-04 03:37:50 +01:00
|
|
|
- sed -i "s/blue {}//" app/build.gradle
|
2020-03-06 21:44:07 +01:00
|
|
|
- sed -i "s/\/\/abortOnError/abortOnError/" app/build.gradle
|
2020-01-16 16:32:58 +01:00
|
|
|
# - sed -i "s/debug {}//" app/build.gradle
|
2019-12-09 02:43:24 +01:00
|
|
|
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
|
2019-12-09 04:15:47 +01:00
|
|
|
script:
|
2020-01-04 03:37:50 +01:00
|
|
|
- ./gradlew build
|
2019-12-09 02:40:19 +01:00
|
|
|
after_success:
|
2020-01-28 15:32:26 +01:00
|
|
|
- $ANDROID_HOME/build-tools/28.0.3/apksigner sign --ks debug.keystore --ks-key-alias androiddebugkey --ks-pass "pass:android" --key-pass "pass:android" --in $(find -name "*-green-debug.apk") --out husky-green-debug.apk
|
|
|
|
- $ANDROID_HOME/build-tools/28.0.3/apksigner sign --ks debug.keystore --ks-key-alias androiddebugkey --ks-pass "pass:android" --key-pass "pass:android" --in $(find -name "*-green-release-unsigned.apk") --out husky-green-release.apk
|
2019-12-09 02:27:54 +01:00
|
|
|
- wget https://raw.githubusercontent.com/FWGS/uploadtool/master/upload.sh
|
|
|
|
- chmod +x upload.sh
|
2020-01-28 15:32:26 +01:00
|
|
|
- ./upload.sh husky-green-debug.apk husky-green-release.apk
|
2020-01-17 17:58:45 +01:00
|
|
|
branches:
|
|
|
|
except:
|
|
|
|
# Do not build tags that we create when we upload to GitHub Releases
|
|
|
|
- /^(?i:continuous)/
|