You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

36 lines
1.4 KiB

  1. language: android
  2. dist: xenial
  3. # Disable building on tags
  4. if: tag IS blank
  5. android:
  6. components:
  7. - android-29
  8. - build-tools-28.0.3
  9. before_script:
  10. - yes | sdkmanager "ndk-bundle"
  11. - export ANDROID_NDK_ROOT=$ANDROID_HOME/ndk-bundle
  12. - export ANDROID_NDK_HOME=$ANDROID_NDK_ROOT
  13. - sed -i "s/blue/\/\/blue/" app/build.gradle
  14. - sed -i "s/\/\/abortOnError/abortOnError/" app/build.gradle
  15. # - sed -i "s/debug {}//" app/build.gradle
  16. before_cache:
  17. - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
  18. - rm -fr $HOME/.gradle/caches/*/plugin-resolution/
  19. cache:
  20. directories:
  21. - $HOME/.gradle/caches/
  22. - $HOME/.gradle/wrapper/
  23. - $HOME/.android/build-cache
  24. script:
  25. - ./gradlew build
  26. after_success:
  27. - $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
  28. - $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
  29. - wget https://raw.githubusercontent.com/FWGS/uploadtool/master/upload.sh
  30. - chmod +x upload.sh
  31. - GITHUB_TOKEN=$GH_TOKEN ./upload.sh husky-green-debug.apk husky-green-release.apk
  32. branches:
  33. except:
  34. # Do not build tags that we create when we upload to GitHub Releases
  35. - /^(?i:continuous)/