machine: java: version: openjdk8 environment: GRADLE_OPTS: -Dorg.gradle.daemon=true -Dorg.gradle.jvmargs=-Xmx2048M dependencies: pre: - echo y | android update sdk --no-ui --all --filter tools,extra-android-m2repository,extra-android-support,extra-google-google_play_services,extra-google-m2repository,android-23 - echo y | android update sdk --no-ui --all --filter build-tools-23.0.2 # Start the gradle daemon - ./gradlew: background: true test: pre: # start the emulator - emulator -avd circleci-android22 -no-audio -no-window: background: true parallel: true override: - fb-adb start-server: background: true # Run robolectric tests, build the apk, and build the test apk for running # the espresso tests - ./gradlew test assembleDebug assembleDebugAndroidTest --console=plain # wait for the emulator to have booted - circle-android wait-for-boot # Run espresso tests - ./gradlew connectedAndroidTest --console=plain post: - cp -r app/build/outputs $CIRCLE_ARTIFACTS # copy the test results to the test results directory. - find app/build/test-results -name "*.xml" -exec cp {} $CIRCLE_TEST_REPORTS/ \; - cp -r app/build/outputs/androidTest-results/* $CIRCLE_TEST_REPORTS