machine:
  java:
    version: openjdk8
  environment:
    GRADLE_OPTS: '-Dorg.gradle.jvmargs="-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError"'

dependencies:
  cache_directories:
    - /usr/local/android-sdk-linux
  pre:
    - echo y | android update sdk --no-ui --all --filter "extra-android-m2repository"
    - echo y | android update sdk --no-ui --all --filter "extra-google-m2repository"
    - echo y | android update sdk --no-ui --all --filter "extra-android-support"
    - echo y | android update sdk --no-ui --all --filter "android-24"
    - echo y | android update sdk --no-ui --all --filter "build-tools-24.0.2"
  override:
    - ./gradlew dependencies -Dorg.gradle.daemon=false --console=plain

test:
  override:
    - ./gradlew lint install -PdisablePreDex -Dorg.gradle.daemon=false --console=plain
  post:
    - mkdir $CIRCLE_TEST_REPORTS/lint
    - mkdir $CIRCLE_ARTIFACTS/javadoc
    - cp -r library/build/outputs/lint-results-debug.* $CIRCLE_TEST_REPORTS/lint
    - cp -r library/build/docs/javadoc/* $CIRCLE_ARTIFACTS/javadoc
machine:
  java:
    version: openjdk8
  environment:
    GRADLE_OPTS: '-Dorg.gradle.jvmargs="-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError"'

dependencies:
  cache_directories:
    - /usr/local/android-sdk-linux
  pre:
    - echo y | android update sdk --no-ui --all --filter "extra-android-m2repository"
    - echo y | android update sdk --no-ui --all --filter "extra-google-m2repository"
    - echo y | android update sdk --no-ui --all --filter "extra-android-support"
    - echo y | android update sdk --no-ui --all --filter "android-24"
    - echo y | android update sdk --no-ui --all --filter "build-tools-24.0.2"
    - echo y | android update sdk --no-ui --all --filter "platform-tools"
  override:
    - ./gradlew dependencies -Dorg.gradle.daemon=false --console=plain

test:
  override:
    - ./gradlew lint install -PdisablePreDex -Dorg.gradle.daemon=false --console=plain
  post:
    - mkdir $CIRCLE_TEST_REPORTS/lint
    - mkdir $CIRCLE_ARTIFACTS/javadoc
    - cp -r library/build/outputs/lint-results-debug.* $CIRCLE_TEST_REPORTS/lint
    - cp -r library/build/docs/javadoc/* $CIRCLE_ARTIFACTS/javadoc
Update platform-tools during ci build
Update platform-tools during ci build
