# Java Gradle CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-java/ for more details
#
version: 2
jobs:
  build:
    docker:
      - image: circleci/openjdk:8-jdk

    steps:
      - checkout

      - restore_cache:
          keys:
            - gradle-{{ checksum "build.gradle" }}
            - gradle-

      - run: ./gradlew check

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

      - run:
          name: Save test results
          command: |
            mkdir -p ~/test-results/junit/
            find . -type f -regex ".*/build/test-results/.*xml" -exec cp {} ~/test-results/junit/ \;
          when: always

      - store_test_results:
          path: ~/test-results

      - store_artifacts:
          path: ~/test-results/junit

# Java Gradle CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-java/ for more details
#
version: 2
jobs:
  build:
    docker:
      - image: cimg/openjdk:8.0

    steps:
      - checkout

      - restore_cache:
          keys:
            - gradle-{{ checksum "build.gradle" }}
            - gradle-

      - run: ./gradlew check

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

      - run:
          name: Save test results
          command: |
            mkdir -p ~/test-results/junit/
            find . -type f -regex ".*/build/test-results/.*xml" -exec cp {} ~/test-results/junit/ \;
          when: always

      - store_test_results:
          path: ~/test-results

      - store_artifacts:
          path: ~/test-results/junit

Use new docker image in CircleCI
Use new docker image in CircleCI