circle.yml
#
# Build configuration for Circle CI
#
general:
artifacts:
- /home/ubuntu/project-name/app/build/outputs/apk/
machine:
environment:
ANDROID_HOME: /usr/local/android-sdk-linux
QEMU_AUDIO_DRV: none
dependencies:
pre:
- wget "https://services.gradle.org/distributions/gradle-2.13-bin.zip"; unzip gradle-2.13-bin.zip
override:
- echo y | android update sdk --no-ui --all --filter tools,platform-tools,build-tools-25.0.2,android-25,extra-google-m2repository,extra-google-google_play_services,extra-android-m2repository
- chmod +x gradlew
- ANDROID_HOME=/usr/local/android-sdk-linux ./gradlew dependencies
test:
override:
# start the build
- (./gradlew assemble -PdisablePreDex):
timeout: 360
- cp -r ${HOME}/${CIRCLE_PROJECT_REPONAME}/app/build/outputs/apk/ $CIRCLE_ARTIFACTS
# start the emulator
- emulator -avd circleci-android24 -no-audio -no-window:
background: true
parallel: true
# wait for it to have booted
- circle-android wait-for-boot
# unlock the emulator screen
- sleep 30
- adb shell input keyevent 82
# run tests against the emulator.
- ./gradlew jacocoTestReport -PdisablePreDex
# copy the build outputs to artifacts
- cp -r app/build/outputs $CIRCLE_ARTIFACTS
# copy the test results to the test results directory.
- cp -r app/build/outputs/androidTest-results/* $CIRCLE_TEST_REPORTS