version: 2.1
executors:
  default:
    docker:
      - image: circleci/android:api-28
    environment:
      JAVA_OPTS: -Xmx3200m

commands:
  setup:
    steps:
      - restore_cache:
          key: v1-gradle-cache-{{ checksum "build.gradle" }}-{{ checksum  "studyplus-android-sdk/build.gradle" }}
      - run:
          name: Download Dependencies
          command: ./gradlew androidDependencies
      - save_cache:
          paths:
            - ~/.gradle
          key: v1-gradle-cache-{{ checksum "build.gradle" }}-{{ checksum  "studyplus-android-sdk/build.gradle" }}
  unit_test:
    steps:
      - run:
          name: Run Tests
          command: ./gradlew lint test
      - store_artifacts:
          path: studyplus-android-sdk2/build/reports
          destination: reports
      - store_test_results:
          path: studyplus-android-sdk2/build/test-results

jobs:
  run_test:
    executor:
      name: default
    steps:
      - checkout
      - setup
      - unit_test

workflows:
  test:
    jobs:
      - run_test
version: 2.1
executors:
  default:
    docker:
      - image: circleci/android:api-28
    environment:
      JAVA_OPTS: -Xmx3200m

commands:
  setup:
    steps:
      - restore_cache:
          key: v1-gradle-cache-{{ checksum "build.gradle" }}-{{ checksum  "studyplus-android-sdk2/build.gradle" }}
      - run:
          name: Download Dependencies
          command: ./gradlew androidDependencies
      - save_cache:
          paths:
            - ~/.gradle
          key: v1-gradle-cache-{{ checksum "build.gradle" }}-{{ checksum  "studyplus-android-sdk2/build.gradle" }}
  unit_test:
    steps:
      - run:
          name: Run Tests
          command: ./gradlew lint test
      - store_artifacts:
          path: studyplus-android-sdk2/build/reports
          destination: reports
      - store_test_results:
          path: studyplus-android-sdk2/build/test-results

jobs:
  run_test:
    executor:
      name: default
    steps:
      - checkout
      - setup
      - unit_test

workflows:
  test:
    jobs:
      - run_test
Fix CircleCI cache dir name
Fix CircleCI cache dir name
