language: android
dist: trusty
jdk: oraclejdk8
sudo: false

env:
  global:
    - ANDROID_API_LEVEL=29
    - ANDROID_BUILD_TOOLS_VERSION=29.0.2
    - TRAVIS_SECURE_ENV_VARS=true

before_install:
  - chmod +x gradlew
  - mkdir "$ANDROID_HOME/licenses" || true
  # Hack to accept Android licenses
  - yes | sdkmanager "platforms;android-$ANDROID_API_LEVEL"


android:
  components:
    # The BuildTools version used by your project
    - tools
    - platform-tools
    - build-tools-$ANDROID_BUILD_TOOLS_VERSION
    # The SDK version used to compile your project
    - android-$ANDROID_API_LEVEL
    - extra-android-m2repository
    - extra-google-android-support

script:
    - ./gradlew clean
    - ./gradlew assembleRelease