version: 2

jobs:
  build:
    docker:
      - image: circleci/openjdk:8
    steps:
      - checkout
      - run: ./gradlew build
      - run: mkdir -p circle-test-results/junit/
      - run: find . -type f -regex ".*/build/test-results/test/.*xml" -exec cp {} circle-test-results/junit/ \;
      - run: mkdir -p circle-test-results/jest/
      - run: find . -type f -regex ".*/build/test-results/jest/.*xml" -exec cp {} circle-test-results/jest/ \;
      - store_test_results:
          path: circle-test-results

workflows:
  version: 2
  build:
    jobs:
      - build

version: 2

jobs:
  build:
    docker:
      - image: circleci/openjdk:8
    steps:
      - checkout
      - run: ./gradlew build --max-workers=2
      - run: mkdir -p circle-test-results/junit/
      - run: find . -type f -regex ".*/build/test-results/test/.*xml" -exec cp {} circle-test-results/junit/ \;
      - run: mkdir -p circle-test-results/jest/
      - run: find . -type f -regex ".*/build/test-results/jest/.*xml" -exec cp {} circle-test-results/jest/ \;
      - store_test_results:
          path: circle-test-results

workflows:
  version: 2
  build:
    jobs:
      - build

Add a --max-workers argument to the Gradle CircleCI build
Add a --max-workers argument to the Gradle CircleCI build

Java 8 has problems getting the CPU count in Docker, so Gradle
could use some assistance in choosing its parallelism level.
