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

dependencies:
  pre:
#    - echo y | android update sdk --no-ui --all --filter "package-name"
#    - android update sdk --no-ui --all --filter "build-tools-24.0.3"
#    - ./gradlew dependencies
    # Android SDK Platform
    - if [ ! -d "/usr/local/android-sdk-linux/platforms/android-25" ]; then echo y | android update sdk --no-ui --all --filter "android-25"; fi
    # Android SDK Build-tools
    - if [ ! -d "/usr/local/android-sdk-linux/build-tools/25.0.2" ]; then echo y | android update sdk --no-ui --all --filter "build-tools-25.0.2"; fi
    # Android Support Repository / Local Maven repository for Support Libraries
    - if [ ! -d "/usr/local/android-sdk-linux/extras/android/m2repository/com/android/support/design/24.2.1" ]; then echo y | android update sdk --no-ui --all --filter "extra-android-m2repository"; fi
  cache_directories:
    - /usr/local/android-sdk-linux/platforms/android-25
    - /usr/local/android-sdk-linux/build-tools/25.0.2
    - /usr/local/android-sdk-linux/extras/android/m2repository

test:
  override:
    - ./gradlew assembleRelease
    - cp -r app/build/outputs $CIRCLE_ARTIFACTS


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

dependencies:
  pre:
    # Android SDK Platform
    - if [ ! -d "/usr/local/android-sdk-linux/platforms/android-25" ]; then echo y | android update sdk --no-ui --all --filter "android-25"; fi
    # Android SDK Build-tools
    - if [ ! -d "/usr/local/android-sdk-linux/build-tools/25.0.2" ]; then echo y | android update sdk --no-ui --all --filter "build-tools-25.0.2"; fi
    # Android Support Repository / Local Maven repository for Support Libraries
    - if [ ! -d "/usr/local/android-sdk-linux/extras/android/m2repository/com/android/support/design/24.2.1" ]; then echo y | android update sdk --no-ui --all --filter "extra-android-m2repository"; fi
  cache_directories:
    - /usr/local/android-sdk-linux/platforms/android-25
    - /usr/local/android-sdk-linux/build-tools/25.0.2
    - /usr/local/android-sdk-linux/extras/android/m2repository

test:
  override:
    - ./gradlew assembleRelease
    - cp -r app/build/outputs $CIRCLE_ARTIFACTS
Remove not needed Circle CI commands
Remove not needed Circle CI commands
