version: 2
jobs:
  build:
    docker:
    - image: circleci/openjdk:8-jdk
    working_directory: ~/app
    steps:
    - checkout
    - run: chmod +x gradlew

      # Download and cache dependencies
    - restore_cache:
        keys:
        - v2-dependencies-{{ checksum "build.gradle.kts" }}
        # fallback to using the latest cache if no exact match is found
        - v2-dependencies-

    - run: ./gradlew dependencies

    - save_cache:
        paths:
        - ~/.gradle
        key: v2-dependencies-{{ checksum "build.gradle.kts" }}

    - run: ./gradlew test
    - store_test_results:
        path: build/test-results

version: 2
jobs:
  build:
    docker:
    - image: circleci/openjdk:8-jdk
    working_directory: ~/app
    steps:
    - checkout
    - run: chmod +x gradlew

      # Download and cache dependencies
    - restore_cache:
        keys:
        - v2-dependencies-{{ checksum "build.gradle.kts" }}-{{ checksum "buildSrc/src/main/kotlin/Version.kt" }}
        - v2-dependencies-{{ checksum "build.gradle.kts" }}
        # fallback to using the latest cache if no exact match is found
        - v2-dependencies-

    - run: ./gradlew dependencies

    - save_cache:
        paths:
        - ~/.gradle
        key: v2-dependencies-{{ checksum "build.gradle.kts" }}-{{ checksum "buildSrc/src/main/kotlin/Version.kt" }}

    - run: ./gradlew test
    - store_test_results:
        path: build/test-results

Include Version.kt in circleci cache key
Include Version.kt in circleci cache key
