version: 2
jobs:
  build:
    docker:
      - image: circleci/openjdk:8u171-jdk

    environment:
      GRADLE_OPTS: -Dorg.gradle.jvmargs=-Xmx512m -Dorg.gradle.daemon=false
      TERM: dumb
      TZ: /usr/share/zoneinfo/America/Los_Angeles

    branches:
      ignore:
        - /rel\/.*/

    steps:
      - checkout
      - restore_cache:
          keys:
          - v1-dependencies-{{ checksum "build.gradle" }}
          # fallback to using the latest cache if no exact match is found
          - v1-dependencies-
      - run:
          name: Run tests
          command: ./gradlew check
      - deploy:
          name: Publish artifacts
          command: |
            if [ -z ${CI_PULL_REQUEST} ]; then
                ./gradlew publish
            fi
      - store_artifacts:
          path: ~/project/build/reports/tests
      - store_test_results:
          path: ~/project/build/test-results/test
      - save_cache:
          paths:
            - ~/.gradle
          key: v1-dependencies-{{ checksum "build.gradle" }}

version: 2
jobs:
  build:
    docker:
      - image: circleci/openjdk:11-jdk

    environment:
      GRADLE_OPTS: -Dorg.gradle.jvmargs=-Xmx512m -Dorg.gradle.daemon=false
      TERM: dumb
      TZ: /usr/share/zoneinfo/America/Los_Angeles

    branches:
      ignore:
        - /rel\/.*/

    steps:
      - checkout
      - restore_cache:
          keys:
          - v1-dependencies-{{ checksum "build.gradle" }}
          # fallback to using the latest cache if no exact match is found
          - v1-dependencies-
      - run:
          name: Run tests
          command: ./gradlew check
      - deploy:
          name: Publish artifacts
          command: |
            if [ -z ${CI_PULL_REQUEST} ]; then
                ./gradlew publish
            fi
      - store_artifacts:
          path: ~/project/build/reports/tests
      - store_test_results:
          path: ~/project/build/test-results/test
      - save_cache:
          paths:
            - ~/.gradle
          key: v1-dependencies-{{ checksum "build.gradle" }}

Update jdk11 image for CircleCi
Update jdk11 image for CircleCi
