machine:
  environment:
    ANDROID_BUILD_TOOLS_VERSION: 23.0.2
    ANDROID_SDK_VERSION: 23
    EMULATOR_AVD: circleci-android21
    TERM: dumb
  java:
    version: oraclejdk8

dependencies:
  pre:
    - echo y | android update sdk --no-ui --all --filter tools
    - echo y | android update sdk --no-ui --all --filter platform-tools,build-tools-${ANDROID_BUILD_TOOLS_VERSION},android-${ANDROID_SDK_VERSION},extra-android-m2repository

test:
  pre:
    - ./gradlew assemble -PdisablePreDex
  override:
    - case ${CIRCLE_NODE_INDEX} in 0) ./gradlew check ;; 1) emulator -avd ${EMULATOR_AVD} -no-audio -no-window & circle-android wait-for-boot; ./gradlew connectedCheck ;; esac:
        parallel: true
  post:
    - find . -type f -regex ".*/build/test-results/.*xml\|.*/build/outputs/androidTest-results/.*xml" -exec cp {} ${CIRCLE_TEST_REPORTS} \;

machine:
  environment:
    ANDROID_BUILD_TOOLS_VERSION: 23.0.2
    ANDROID_SDK_VERSION: 23
    EMULATOR_AVD: circleci-android21
    TERM: dumb
  java:
    version: oraclejdk8

dependencies:
  pre:
    - echo y | android update sdk --no-ui --all --filter tools
    - echo y | android update sdk --no-ui --all --filter platform-tools,build-tools-${ANDROID_BUILD_TOOLS_VERSION},android-${ANDROID_SDK_VERSION},extra-android-m2repository

test:
  pre:
    - ./gradlew assemble -PdisablePreDex
  override:
    - case ${CIRCLE_NODE_INDEX} in 0) ./gradlew check ;; 1) emulator -avd ${EMULATOR_AVD} -no-audio -no-window & circle-android wait-for-boot; ./gradlew connectedCheck ;; esac:
        parallel: true
  post:
    - find . -type f -regex ".*/build/outputs/.*xml\|.*/build/test-results/.*xml" -exec cp {} ${CIRCLE_TEST_REPORTS} \;

Copy all .xml files from outputs as test results
Copy all .xml files from outputs as test results
