caipivara
2/14/2016 - 11:04 PM

Android / Travis - Travis setup for a project with google play services, support, fabric and project env variables and java 8 support

Android / Travis - Travis setup for a project with google play services, support, fabric and project env variables and java 8 support

language: android

jdk:
  - oraclejdk7
  - oraclejdk8

android:
  licenses:
    - 'android-sdk-license-.+'

  components:
    - tools
    - build-tools-23.0.2
    - android-23
    - extra-google-m2repository
    - extra-google-google_play_services
    - extra-android-support
    - extra-android-m2repository

before_install:
  - export JAVA7_HOME=/usr/lib/jvm/java-7-oracle
  - export JAVA8_HOME=/usr/lib/jvm/java-8-oracle
  - export JAVA_HOME=$JAVA8_HOME
  - chmod +x gradlew

script:
    - echo "apiKey=$FABRIC_API_KEY" >> app/fabric.properties
    - echo "apiSecret=$FABRIC_API_SECRET" >> app/fabric.properties
    - echo "TODAY_ADS_UNIT_ID_BANNER=ADS_UNIT_ID_BANNER" >> app/gradle.properties
    - ./gradlew testMockedDebug --stacktrace

before_cache:
  - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
cache:
  directories:
    - $HOME/.gradle/caches  
    - $HOME/.gradle/wrapper
    - $HOME/.gradle/caches/2.10
    - $HOME/.gradle/caches/jars-1
    - $HOME/.gradle/daemon
    - $HOME/.gradle/native