machine:
  environment:
    ANDROID_HOME: /usr/local/android-sdk-linux
    ANDROID_BUILD_TOOLS: 24.0.1
    ANDROID_PLATFORM: 24

dependencies:
  pre:
    - if [ ! -e $ANDROID_HOME/build-tools/$ANDROID_BUILD_TOOLS ]; then echo y | android update sdk --no-ui --all --filter build-tools-$ANDROID_BUILD_TOOLS; fi
    - if [ ! -e $ANDROID_HOME/platforms/android-$ANDROID_PLATFORM ]; then echo y | android update sdk --no-ui --all --filter "android-${ANDROID_PLATFORM}"; fi

  cache_directories:
    - /usr/local/android-sdk-linux/build-tools/24.0.1
    - /usr/local/android-sdk-linux/platforms/android-24
    - /usr/local/android-sdk-linux/tools

test:
  override:
    - ./gradlew lint test assembleDebug assembleAndroidTest countDebugDexMethods -PdisablePreDex
    - scripts/remoteTesting.sh

  post:
    - mkdir $CIRCLE_TEST_REPORTS/dexcount
    - cp -r app/build/outputs/dexcount/debugChart/* $CIRCLE_TEST_REPORTS/dexcount
    - mkdir $CIRCLE_TEST_REPORTS/lint
    - cp app/build/outputs/lint-results-debug.html $CIRCLE_TEST_REPORTS/lint

machine:
  environment:
    ANDROID_HOME: /usr/local/android-sdk-linux
    ANDROID_BUILD_TOOLS: 24.0.1
    ANDROID_PLATFORM: 24

dependencies:
  pre:
    - if [ ! -e $ANDROID_HOME/build-tools/$ANDROID_BUILD_TOOLS ]; then echo y | android update sdk --no-ui --all --filter build-tools-$ANDROID_BUILD_TOOLS; fi
    - if [ ! -e $ANDROID_HOME/platforms/android-$ANDROID_PLATFORM ]; then echo y | android update sdk --no-ui --all --filter "android-${ANDROID_PLATFORM}"; fi

  cache_directories:
    - /usr/local/android-sdk-linux/build-tools/24.0.1
    - /usr/local/android-sdk-linux/platforms/android-24
    - /usr/local/android-sdk-linux/tools

test:
  override:
    - ./gradlew lint testDebugUnitTestCoverage assembleDebug assembleAndroidTest countDebugDexMethods -PdisablePreDex
    - scripts/remoteTesting.sh

  post:
    - mkdir $CIRCLE_TEST_REPORTS/dexcount
    - cp -r app/build/outputs/dexcount/debugChart/* $CIRCLE_TEST_REPORTS/dexcount
    - mkdir $CIRCLE_TEST_REPORTS/lint
    - cp app/build/outputs/lint-results-debug.html $CIRCLE_TEST_REPORTS/lint
    - mkdir $CIRCLE_TEST_REPORTS/test
    - cp -r app/build/reports/tests/debug $CIRCLE_TEST_REPORTS/test
    - mkdir $CIRCLE_TEST_REPORTS/jacoco
    - cp -r app/build/reports/jacoco/testDebugUnitTestCoverage/html $CIRCLE_TEST_REPORTS/jacoco

Add code coverage to exported reports
Add code coverage to exported reports
