Skip to content

Instantly share code, notes, and snippets.

@h0lyalg0rithm
Created January 10, 2016 20:44
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save h0lyalg0rithm/36f332b21a901a3124c2 to your computer and use it in GitHub Desktop.
Save h0lyalg0rithm/36f332b21a901a3124c2 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-23.0.1,android-23,extra-google-m2repository,extra-google-google_play_services,extra-android-support
- 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 crashlyticsUploadDistributionProduction -PdisablePreFex):
timeout: 720
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment