代码拉取完成,页面将自动刷新
language: android
jdk: oraclejdk8
sudo: false
notifications:
email:
on_success: change
on_failure: change
env:
global:
- COMPILE_API_LEVEL=29
- EMULATOR_API_LEVEL=24 # It seems emulator levels 25,26,27 from main repos have google_apis by default, and do not support armeabi-v7a. Check commit comment.
- EMULATOR_TAG=default # Possible values are default, google_apis, android-tv, android-wear, android-wear-cn
- EMULATOR_ABI=armeabi-v7a # Default is armeabi-v7a, possible options are: x86, x86_64, mips, arm64-v8a, armeabi-v7a. Note: check commit comment
- EMULATOR_NAME=qksms3
- ANDROID_BUILD_TOOLS_VERSION=29.0.2 # Match build-tools version used in build.gradle
- EMULATOR="system-images;android-${EMULATOR_API_LEVEL};${EMULATOR_TAG};${EMULATOR_ABI}" # Used to install/create emulator
android:
components:
- tools
- platform-tools
- tools
- extra
# The build tools used in the project
- build-tools-${ANDROID_BUILD_TOOLS_VERSION}
# The SDK used in the project
- android-${COMPILE_API_LEVEL}
# For running the emulator in Travis
- android-${EMULATOR_API_LEVEL}
- sys-img-${EMULATOR_ABI}-android-${EMULATOR_API_LEVEL}
# Set up Android-sdk and the emulator
before_install:
# Decrypt keystore and google-services.json
- openssl aes-256-cbc -K $encrypted_4d1d940e2c65_key -iv $encrypted_4d1d940e2c65_iv -in secrets.tar.enc -out secrets.tar -d
- tar xvf secrets.tar
- echo 'count=0' > /home/travis/.android/repositories.cfg # Avoid warning
- ls -lar $HOME/**/*
# List and delete unnecessary components to free space
- sdkmanager --list || true # Print out package list for debug purposes
- sdkmanager --uninstall "extras;google;google_play_services"
- yes | sdkmanager "tools" # Update tools
- yes | sdkmanager "platforms;android-${EMULATOR_API_LEVEL}" # Android platform required by emulator
- yes | sdkmanager "platforms;android-${COMPILE_API_LEVEL}" # Android platform required by compiler
- yes | sdkmanager "build-tools;${ANDROID_BUILD_TOOLS_VERSION}" # Android build tools
- yes | sdkmanager "${EMULATOR}" # Install emulator system image
- sdkmanager --list || true # Print out package list for debug purposes
# Run the emulator
install:
# emulator instance
- echo no | android create avd --force -n ${EMULATOR_NAME} -k "${EMULATOR}"
# Run emulator in a subshell, this seems to solve the travis QT issue
- ( cd "$(dirname "$(which emulator)")" && ./emulator -avd ${EMULATOR_NAME} -verbose -show-kernel -selinux permissive -no-audio -no-window -no-boot-anim -wipe-data & )
- android-wait-for-emulator
- adb shell settings put global window_animation_scale 0 &
- adb shell settings put global transition_animation_scale 0 &
- adb shell settings put global animator_duration_scale 0 &
- sleep 30
- adb shell input keyevent 82 &
- adb devices
# Gradle setup
before_script:
- cd ${TRAVIS_BUILD_DIR}
- ./gradlew --version
- ./gradlew clean
# Build APK
script:
- |
./gradlew :presentation:assembleWithAnalyticsRelease :presentation:bundleWithAnalyticsRelease assembleAndroidTest -PtestCoverageEnabled='true'
retval=$?
if [$retval -ne 0]; then
echo "error on assembling, exit code: "$retval
exit $retval
fi
# Deploy APK
deploy:
provider: releases
skip_cleanup: true
overwrite: true
api_key:
secure: XF7V/I02gpyOzCAFXEFyrThXVUUnKjSaWQ8lppO50mVtdugimjWIPtHrcYASaJQf9INhqo0lamk+khPxtKxc1BSCp8o+c22UKcpczyjD4kK27a3zKfuNQWteBRjCH34vIGnrRFSHSWYLIgeuoIK3q5Lq4IBK/Od3mfpRaDt1ER+IqMzR3L205x1H8dW3MVuxXgdnq3jHlRpq86oOe293+dnblVCtWUvAzwhZPnnbBc4JUaNomMI7dLJ/pAigByCoHHmG9pc2Cky1yyWVAnTZFAlf2PbzPDLRRnXmHuYKfHxiZgd/l8JTiZdhky9cXgFoSxvJyDABRqqLxVNfXt2ZwgdtiulZml8RB1FB0L37qL72mxWgi6y9IbQgt/FG20K2QpSBglk0bCGLS+h5Yz3kV4fhsBY7llpWGw14BvlAx9sUfl3Ej+IUsWoJgA00TFNGDG8sMyOFoCQVz/sB4Dv4h+JfynJZcmm8okcfYrWBHOoHY7cH3chBWp/2A736f2A/aqnBd6z8a03toe2ILC9eSOiIhrVxPyqLmEKBD1rCduVFNteqGwm9G9YwKpvFibTqu0gqEtfF7cmuMH6M5PYExI5EzoewZTYmgp02+lBuFAEMvycVvXcu8VfeeT6cgeLlmz2hsbo93UfoSQyP+gSojMOOkVUsl6mIp1STLiJ5IRY=
file:
- /home/travis/build/moezbhatti/qksms/presentation/build/outputs/bundle/withAnalyticsRelease/presentation.aab
- /home/travis/build/moezbhatti/qksms/presentation/build/outputs/apk/withAnalytics/release/presentation-withAnalytics-release.apk
on:
repo: moezbhatti/qksms
tags: true
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。