language: android
cache: false

jdk:
  - oraclejdk8

notifications:
  email: false

env:
  global:
    - GRADLE_OPTS="-Xmx512m -XX:MaxPermSize=512m"

script:
  # Build
  - ./gradlew app:assembleDebug

  # Run unit tests on JVM
  - ./gradlew app:test

  # Run instrumentation tests (annotated with @LargeTest) on emulator
  - ./gradlew app:connectedAndroidTest -Pandroid.testInstrumentationRunnerArguments.size=large

before_script:
  - echo no | android create avd --force -n test -t android-19 --abi armeabi-v7a
  - emulator -avd test -no-skin -no-audio -no-window &
  - android-wait-for-emulator
  - adb shell input keyevent 82 &

android:
  components:
    - build-tools-23.0.1
    - android-23
    - extra-android-m2repository
    - extra-google-m2repository
    - extra-google-google_play_services

branches:
  only:
    - master

before_install:
  - openssl aes-256-cbc -K $encrypted_3366a34600b0_key -iv $encrypted_3366a34600b0_iv -in SecretStuff.java.enc -out app/src/main/java/com/chromium/fontinstaller/SecretStuff.java -d

language: android
cache: false

jdk:
  - oraclejdk8

notifications:
  email: false

env:
  global:
    - GRADLE_OPTS="-Xmx512m -XX:MaxPermSize=512m"

script:
  # Build
  - ./gradlew app:assembleDebug

  # Run unit tests on JVM
  - ./gradlew app:test

  # Run instrumentation tests (annotated with @LargeTest) on emulator
  - ./gradlew app:connectedAndroidTest -Pandroid.testInstrumentationRunnerArguments.size=large

before_script:
  - echo no | android create avd --force -n test -t android-19 --abi armeabi-v7a
  - emulator -avd test -no-skin -no-audio -no-window &
  - android-wait-for-emulator
  - adb shell input keyevent 82 &

after_failure:
  - cat /home/travis/build/ItsPriyesh/Fontster/app/build/reports/androidTests/connected/com.chromium.fontinstaller.*.html
    
android:
  components:
    - build-tools-23.0.1
    - android-23
    - extra-android-m2repository
    - extra-google-m2repository
    - extra-google-google_play_services

branches:
  only:
    - master

before_install:
  - openssl aes-256-cbc -K $encrypted_3366a34600b0_key -iv $encrypted_3366a34600b0_iv -in SecretStuff.java.enc -out app/src/main/java/com/chromium/fontinstaller/SecretStuff.java -d

Print out test html report on failure
Print out test html report on failure
