language: android

jdk:
  - oraclejdk8

env:
  global:
    - ANDROID_BUILD_TOOLS_VERSION=24.0.0-rc2
    - ANDROID_SDK_VERSION=23
    - JPM_BIN=${HOME}/jpm/bin
    - JPM_HOME=${HOME}/jpm

android:
  components:
    - tools
    - platform-tools
    - build-tools-${ANDROID_BUILD_TOOLS_VERSION}
    - android-${ANDROID_SDK_VERSION}
    - extra-android-m2repository

before_install:
  - curl -sL http://bit.ly/jpm4j > jpm4j.jar
  - java -jar jpm4j.jar --home ${JPM_HOME} --bindir ${JPM_BIN} init
  - ${JPM_BIN}/jpm install com.codacy:codacy-coverage-reporter:assembly

script:
   - ./gradlew clean assembleDebug checkstyle lintDebug testDebugUnitTest createDebugCoverageReport -PdisablePreDex

after_success:
  - ${JPM_BIN}/codacy-coverage-reporter --projectToken ${CODACY_PROJECT_TOKEN} --language Java --coverageReport app/build/reports/coverage/debug/report.xml

before_cache:
  - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock

cache:
  directories:
    - $HOME/.gradle/caches/
    - $HOME/.gradle/wrapper/

language: android

jdk:
  - oraclejdk8

env:
  global:
    - ANDROID_SDK_VERSION=23
    - JPM_BIN=${HOME}/jpm/bin
    - JPM_HOME=${HOME}/jpm

android:
  components:
    - tools-preview
    - platform-tools-preview
    - build-tools-24.0.0-preview
    - android-${ANDROID_SDK_VERSION}
    - extra-android-m2repository

before_install:
  - curl -sL http://bit.ly/jpm4j > jpm4j.jar
  - java -jar jpm4j.jar --home ${JPM_HOME} --bindir ${JPM_BIN} init
  - ${JPM_BIN}/jpm install com.codacy:codacy-coverage-reporter:assembly

script:
   - ./gradlew clean assembleDebug checkstyle lintDebug testDebugUnitTest createDebugCoverageReport -PdisablePreDex

after_success:
  - ${JPM_BIN}/codacy-coverage-reporter --projectToken ${CODACY_PROJECT_TOKEN} --language Java --coverageReport app/build/reports/coverage/debug/report.xml

before_cache:
  - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock

cache:
  directories:
    - $HOME/.gradle/caches/
    - $HOME/.gradle/wrapper/

Use latest versions of Android SDK Tools, Platform Tools, and Build Tools
Use latest versions of Android SDK Tools, Platform Tools, and Build Tools
