|  | 
|  | 1 | +version: 2 | 
|  | 2 | +jobs: | 
|  | 3 | +  build: | 
|  | 4 | +    working_directory: ~/launchdarkly/android-client-private | 
|  | 5 | +    docker: | 
|  | 6 | +      - image: circleci/android:api-27-alpha | 
|  | 7 | +    environment: | 
|  | 8 | +      JVM_OPTS: -Xmx3200m | 
|  | 9 | +      CIRCLE_ARTIFACTS: /tmp/circleci-artifacts | 
|  | 10 | +      CIRCLE_TEST_REPORTS: /tmp/circleci-test-results | 
|  | 11 | + | 
|  | 12 | +    steps: | 
|  | 13 | +      - checkout | 
|  | 14 | +      - restore_cache: | 
|  | 15 | +          keys: | 
|  | 16 | +            # This branch if available | 
|  | 17 | +              - v1-dep-{{ .Branch }}- | 
|  | 18 | +            # Default branch if not | 
|  | 19 | +              - v1-dep-master- | 
|  | 20 | +                    # Any branch if there are none on the default branch - this should be unnecessary if you have your default branch configured correctly | 
|  | 21 | +              - v1-dep- | 
|  | 22 | + | 
|  | 23 | +      - run: | 
|  | 24 | +          name: Download Dependencies | 
|  | 25 | +          command: ./gradlew androidDependencies | 
|  | 26 | +      - run: sudo mkdir -p $CIRCLE_TEST_REPORTS | 
|  | 27 | +      - run: sudo apt-get -y -qq install awscli | 
|  | 28 | +      - run: sudo mkdir -p /usr/local/android-sdk-linux/licenses | 
|  | 29 | + | 
|  | 30 | +      - save_cache: | 
|  | 31 | +              key: v1-dep-{{ .Branch }}-{{ epoch }} | 
|  | 32 | +              paths: | 
|  | 33 | +              # This is a broad list of cache paths to include many possible development environments | 
|  | 34 | +              # You can probably delete some of these entries | 
|  | 35 | +              - vendor/bundle | 
|  | 36 | +              - ~/virtualenvs | 
|  | 37 | +              - ~/.m2 | 
|  | 38 | +              - ~/.ivy2 | 
|  | 39 | +              - ~/.bundle | 
|  | 40 | +              - ~/.go_workspace | 
|  | 41 | +              - ~/.gradle | 
|  | 42 | +              - ~/.cache/bower | 
|  | 43 | +              # These cache paths were specified in the 1.0 config | 
|  | 44 | +              - /usr/local/android-sdk-linux/platforms/android-26 | 
|  | 45 | +              - /usr/local/android-sdk-linux/build-tools/26.0.2 | 
|  | 46 | +              - /usr/local/android-sdk-linux/platforms/android-27 | 
|  | 47 | +              - /usr/local/android-sdk-linux/build-tools/27.0.3 | 
|  | 48 | +              - /usr/local/android-sdk-linux/extras/android/m2repository | 
|  | 49 | +      - run: unset ANDROID_NDK_HOME | 
|  | 50 | + | 
|  | 51 | +      - run: ./gradlew :launchdarkly-android-client:assembleDebug --console=plain -PdisablePreDex | 
|  | 52 | +      - run: ./gradlew :launchdarkly-android-client:test --console=plain -PdisablePreDex | 
|  | 53 | + | 
|  | 54 | +      - run: ./gradlew packageRelease --console=plain -PdisablePreDex | 
|  | 55 | +      - run: | 
|  | 56 | +          name: Run Tests | 
|  | 57 | +          command: ./gradlew test | 
|  | 58 | + | 
|  | 59 | +      - run: | 
|  | 60 | +          name: Save test results | 
|  | 61 | +          command: | | 
|  | 62 | +                mkdir -p ~/tests/test-results | 
|  | 63 | +                find . -type f -regex ".*/build/test-results/.*xml" -exec cp {} ~/tests/test-results/ \; | 
|  | 64 | +          when: always | 
|  | 65 | +      - store_test_results: | 
|  | 66 | +            path: ~/tests | 
|  | 67 | +      - store_artifacts: | 
|  | 68 | +            path: ~/tests | 
0 commit comments