version: 2
jobs:
  build:
    branches:
      only:
        - master
        - prod
        - /feature.*/
        - /bugfix.*/

    docker:
      - image: circleci/openjdk:8-jdk
      
    working_directory: ~/repo

    environment:
      JVM_OPTS: -Xmx3200m
      TERM: dumb
    
    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: gradle dependencies

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

      - run: ./gradlew test
      - store_artifacts:
          path: build/reports/tests
          destination: reports
        
      - run: ./gradlew build

      - store_artifacts:
          path: build/libs
          destination: artifacts



version: 2
jobs:
  build:
    branches:
      only:
        - master
        - prod
        - /feature.*/
        - /bugfix.*/

    docker:
      - image: circleci/openjdk:8-jdk
      
    working_directory: ~/repo

    environment:
      JVM_OPTS: -Xmx3200m
      TERM: dumb
    
    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: ./gradlew dependencies

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

      - run: ./gradlew test
      - store_artifacts:
          path: build/reports/tests
          destination: reports
        
      - run: ./gradlew build

      - store_artifacts:
          path: build/libs
          destination: artifacts



Use gradle wrapper to collect dependencies
Use gradle wrapper to collect dependencies
