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

      # Specify service dependencies here if necessary
      # CircleCI maintains a library of pre-built images
      # documented at https://circleci.com/docs/2.0/circleci-images/
      # - image: circleci/postgres:9.4

    working_directory: ~/interlok

    environment:
      # Customize the JVM maximum heap limit
      JVM_OPTS: -Xmx3200m
      TERM: dumb

    steps:
      - run:
          name: Configure Gradle
          command: |
            mkdir -p ~/.gradle
            echo "org.gradle.warning.mode=none" > ~/.gradle/gradle.properties
            echo "org.gradle.jvmargs=-Djava.security.egd=file:/dev/./urandom" >> ~/.gradle/gradle.properties

      - checkout

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


      # run tests!
      - run:
          name: Run Tests
          command: ./gradlew -PverboseTests=true test

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

# Java Gradle CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-java/ for more details
#
version: 2
jobs:
  build:
    machine: true
      - image: circleci/classic:latest

      # Specify service dependencies here if necessary
      # CircleCI maintains a library of pre-built images
      # documented at https://circleci.com/docs/2.0/circleci-images/
      # - image: circleci/postgres:9.4

    working_directory: ~/interlok

    environment:
      TERM: dumb

    steps:
      - run:
          name: Configure Gradle
          command: |
            mkdir -p ~/.gradle
            echo "org.gradle.warning.mode=none" > ~/.gradle/gradle.properties
            echo "org.gradle.jvmargs=-Xmx2G -Djava.security.egd=file:/dev/./urandom" >> ~/.gradle/gradle.properties

      - checkout

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


      # run tests!
      - run:
          name: Run Tests
          command: ./gradlew -PverboseTests=true test

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

Switch to a machine build
Switch to a machine build
