general:
  artifacts:
    - app/build/outputs
    - app/build/reports

machine:
  java:
    version: oraclejdk8
  environment:
    ADB_INSTALL_TIMEOUT: 8
    GRADLE_OPTS: '-Dorg.gradle.jvmargs="-Xmx512m -XX:+HeapDumpOnOutOfMemoryError"'

dependencies:
  override:
    - $ANDROID_HOME/tools/android list target
    - make bootstrap-circle
    - echo y | android update sdk --no-ui --all --filter android-25
    - echo y | android update sdk --no-ui --all --filter build-tools-25.0.0
    - echo y | android update sdk --no-ui --all --filter platform-tools
    - 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
    - ./gradlew dependencies
  cache_directories:
    - ~/.gradle
    - ~/.android

test:
  override:
    - ./gradlew checkstyle
    - ./gradlew lintExternalPre21Release
    - ./gradlew assembleExternalPre21Release testExternalPre21Release -PdisablePreDex

experimental:
  notify:
    branches:
      only:
        - master
