dist: trusty

language: android

jdk:
  - oraclejdk8

android:
  components:

    # All the build system components should be at the latest version
    - tools
    - platform-tools
    - tools
    # Note that the tools section appears twice on purpose as it’s required
    # to get the newest Android SDK tools. Source: Travis CI docs.
    - build-tools-30.0.3

    # The libraries we can't get from Maven Central or similar
    - extra

branches:
  except:
  - /^v\..*$/ # Exclude version tags

notifications:
  email: true

before_install:
- yes | sdkmanager "platforms;android-30"

before_script:

  # Ensure Gradle wrapper is executable
  - chmod +x gradlew

  # Ensure signing configuration is present
  - mv app/gradle.properties.example app/gradle.properties

  # Reduce memory usage / avoid OutOfMemoryError with Gradle 4.10.3
  - echo "org.gradle.jvmargs=-Xmx2048m -Xms512m -XX:MaxPermSize=768m" >> gradle.properties

script:
  - ./gradlew clean test assembleDebug

addons:
  # Fix OpenJDK builds
  # https://github.com/travis-ci/travis-ci/issues/5227
  hostname: short-hostname

dist: trusty

language: android

jdk: openjdk8

android:
  components:

    # All the build system components should be at the latest version
    - tools
    - platform-tools
    - tools
    # Note that the tools section appears twice on purpose as it’s required
    # to get the newest Android SDK tools. Source: Travis CI docs.
    - build-tools-30.0.3

    # The libraries we can't get from Maven Central or similar
    - extra

branches:
  except:
  - /^v\..*$/ # Exclude version tags

notifications:
  email: true

before_install:
- yes | sdkmanager "platforms;android-30"

before_script:

  # Ensure Gradle wrapper is executable
  - chmod +x gradlew

  # Ensure signing configuration is present
  - mv app/gradle.properties.example app/gradle.properties

  # Reduce memory usage / avoid OutOfMemoryError with Gradle 4.10.3
  - echo "org.gradle.jvmargs=-Xmx2048m -Xms512m -XX:MaxPermSize=768m" >> gradle.properties

script:
  - ./gradlew clean test assembleDebug

addons:
  # Fix OpenJDK builds
  # https://github.com/travis-ci/travis-ci/issues/5227
  hostname: short-hostname

Use OpenJDK on Travis CI.
Use OpenJDK on Travis CI.

+ Context: https://docs.travis-ci.com/user/languages/java#using-java-10-and-later.
