version: 2
jobs:
  build:
    parallelism: 1
    shell: /bin/bash --login
    docker:
    - image: circleci/android:api-28-alpha
    steps:
    - checkout
    - restore_cache:
        keys:
        # This branch if available
        - v1-dep-{{ .Branch }}-
        # Default branch if not
        - v1-dep-master-
        # Any branch if there are none on the default branch - this should be unnecessary if you have your default branch configured correctly
        - v1-dep-
    - run: ./gradlew dependencies
    # Save dependency cache
    - save_cache:
        key: v1-dep-{{ .Branch }}-{{ epoch }}
        paths:
        - ~/.m2
        - ~/.gradle
    - run: ./gradlew assembleDogfood test runTest
    # Save test results
    - store_test_results:
        path: /tmp/circleci-test-results
    # Save artifacts
    - store_artifacts:
        path: /tmp/circleci-artifacts
    - store_artifacts:
        path: /tmp/circleci-test-results

version: 2
jobs:
  build:
    parallelism: 1
    shell: /bin/bash --login
    docker:
    - image: circleci/android:api-28-alpha
    environment:
      TERM: xterm # Workaround for Gradle issues https://discuss.circleci.com/t/circleci-terminal-is-a-tty-but-term-is-not-set/9965/18
    steps:
    - checkout
    - restore_cache:
        keys:
        # This branch if available
        - v1-dep-{{ .Branch }}-
        # Default branch if not
        - v1-dep-master-
        # Any branch if there are none on the default branch - this should be unnecessary if you have your default branch configured correctly
        - v1-dep-
    - run: ./gradlew dependencies
    # Save dependency cache
    - save_cache:
        key: v1-dep-{{ .Branch }}-{{ epoch }}
        paths:
        - ~/.m2
        - ~/.gradle
    - run: ./gradlew assembleDogfood test runTest
    # Save test results
    - store_test_results:
        path: /tmp/circleci-test-results
    # Save artifacts
    - store_artifacts:
        path: /tmp/circleci-artifacts
    - store_artifacts:
        path: /tmp/circleci-test-results

Set TERM to avoid Gradle issues
Set TERM to avoid Gradle issues
