<commit_before>version: 2

jobs:
  build:
    docker:
      - image: circleci/openjdk:8-jdk
    working_directory: ~/gax-kotlin
    steps:
      - checkout
      - restore_cache:
          key: gax-kotlin-dependencies-{{ checksum "build.gradle" }}-{{ checksum "kgax-core/build.gradle" }}-{{ checksum "kgax-grpc/build.gradle" }}
      - run: 
          name: Download Dependencies
          command: ./gradlew dependencies
      - save_cache:
          paths:
            - ~/.gradle
          key: gax-kotlin-dependencies-{{ checksum "build.gradle" }}-{{ checksum "kgax-core/build.gradle" }}-{{ checksum "kgax-grpc/build.gradle" }}       
      - run: 
           name: Build and run checks
           command: ./gradlew check
      - run: 
          name: Save test results
          command: |
            mkdir -p ~/junit/
            find . -type f -regex ".*/build/test-results/.*xml" -exec cp {} ~/junit/ \;
          when: always
      - store_test_results:
          path: ~/junit
      - store_artifacts:
          path: ~/junit        
      - run: 
          name: Codecov
          command: bash <(curl -s https://codecov.io/bash)
          when: always

  build_examples:
    working_directory: ~/gax-kotlin/kgax-grcp-examples
    docker:
      - image: circleci/android:api-27-alpha
    environment:
      JVM_OPTS: -Xmx3200m
    steps:
      - checkout
      - restore_cache:
          key: jars-{{ checksum "build.gradle" }}-{{ checksum  "app/build.gradle" }}
      - run:
          name: Download dependencies
          command: ./gradlew androidDependencies
      - save_cache:
          paths:
            - ~/.gradle
          key: jars-{{ checksum "build.gradle" }}-{{ checksum  "app/build.gradle" }}
      - run:
          name: Create placeholder key
          command: touch app/src/main/res/raw/sa.json
      - run:
          name: Run checks
          command: ./gradlew check
      - store_artifacts:
          path: app/build/reports
          destination: reports
      - store_test_results:
          path: app/build/test-results

workflows:
  version: 2
  build_all:
    jobs:
      - build
      - build_examples
<commit_msg>circleci<commit_after>version: 2

jobs:
  build:
    docker:
      - image: circleci/openjdk:8-jdk
    working_directory: ~/gax-kotlin
    steps:
      - checkout
      - restore_cache:
          key: gax-kotlin-dependencies-{{ checksum "build.gradle" }}-{{ checksum "kgax-core/build.gradle" }}-{{ checksum "kgax-grpc/build.gradle" }}
      - run: 
          name: Download Dependencies
          command: ./gradlew dependencies
      - save_cache:
          paths:
            - ~/.gradle
          key: gax-kotlin-dependencies-{{ checksum "build.gradle" }}-{{ checksum "kgax-core/build.gradle" }}-{{ checksum "kgax-grpc/build.gradle" }}       
      - run: 
           name: Build and run checks
           command: ./gradlew check
      - run: 
          name: Save test results
          command: |
            mkdir -p ~/junit/
            find . -type f -regex ".*/build/test-results/.*xml" -exec cp {} ~/junit/ \;
          when: always
      - store_test_results:
          path: ~/junit
      - store_artifacts:
          path: ~/junit        
      - run: 
          name: Codecov
          command: bash <(curl -s https://codecov.io/bash)
          when: always

  build_examples:
    working_directory: ~/gax-kotlin/kgax-grcp-examples
    docker:
      - image: circleci/android:api-27-alpha
    environment:
      JVM_OPTS: -Xmx3200m
    steps:
      - checkout:
          path: ~/gax-kotlin
      - restore_cache:
          key: jars-{{ checksum "build.gradle" }}-{{ checksum  "app/build.gradle" }}
      - run:
          name: Download dependencies
          command: ./gradlew androidDependencies
      - save_cache:
          paths:
            - ~/.gradle
          key: jars-{{ checksum "build.gradle" }}-{{ checksum  "app/build.gradle" }}
      - run:
          name: Create placeholder key
          command: touch app/src/main/res/raw/sa.json
      - run:
          name: Run checks
          command: ./gradlew check
      - store_artifacts:
          path: app/build/reports
          destination: reports
      - store_test_results:
          path: app/build/test-results

workflows:
  version: 2
  build_all:
    jobs:
      - build
      - build_examples

{'fraction_non_alphanumeric': 0.12145655681032495, 'fraction_numerical': 0.004148421295229315, 'mean_word_length': 1.6382978723404256, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7278488', 'n_tokens_mistral': 1413, 'n_tokens_neox': 1319, 'n_words': 294}