Skip to content

Instantly share code, notes, and snippets.

@bskim45
Forked from h0lyalg0rithm/circle.yml
Last active August 31, 2016 02:33
Show Gist options
  • Save bskim45/a2496c13586fc7a263560eeddb2fc33f to your computer and use it in GitHub Desktop.
Save bskim45/a2496c13586fc7a263560eeddb2fc33f to your computer and use it in GitHub Desktop.
Android CircleCI Build config
#Install android build tools, platforms
#Supported versions here https://circleci.com/docs/android
dependencies:
override:
- echo y | android update sdk --no-ui --all --filter tools,platform-tools,build-tools-24.0.2,android-23,extra-google-m2repository,extra-google-google_play_services,extra-android-m2repository
- ANDROID_HOME=/usr/local/android-sdk-linux ./gradlew dependencies
#Pull any submodules
checkout:
post:
- git submodule init
- git submodule update
#-PdisablePreDex is a must else gradle just dies due to memory limit
#Replace
test:
override:
- (./gradlew assemble -PdisablePreDex):
timeout: 360
- cp -r ${HOME}/${CIRCLE_PROJECT_REPONAME}/app/build/outputs/apk/ $CIRCLE_ARTIFACTS
- emulator -avd circleci-android22 -no-audio -no-window:
background: true
parallel: true
# wait for it to have booted
- circle-android wait-for-boot
# run tests against the emulator.
- ./gradlew connectedAndroidTest
#Deploy when tests pass
deployment:
master:
branch: master
commands:
- (./gradlew publishApkRelease -PdisablePreFex):
timeout: 720
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment