config.yml 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. version: 2
  2. jobs:
  3. build:
  4. working_directory: ~/code
  5. docker:
  6. - image: circleci/android:api-29
  7. parallelism: 4
  8. tags:
  9. only: /^v.*/
  10. branches:
  11. ignore: /[^(^master$)]/
  12. environment:
  13. JVM_OPTS: -Xmx3200m
  14. steps:
  15. - checkout
  16. - restore_cache:
  17. key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
  18. - run:
  19. name: Chmod permissions #if permission for Gradlew Dependencies fail, use this.
  20. command: sudo chmod +x ./gradlew
  21. - run:
  22. name: Run build
  23. command: export TERM=${TERM:-dumb} && ./gradlew clean build
  24. - run:
  25. name: Download Dependencies
  26. command: ./gradlew androidDependencies
  27. - save_cache:
  28. paths:
  29. - ~/.gradle
  30. key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
  31. - run:
  32. name: Run Tests
  33. command: ./gradlew lint test
  34. - store_artifacts:
  35. path: app/build/reports
  36. destination: reports
  37. - store_test_results:
  38. path: app/build/test-results
  39. # See https://circleci.com/docs/2.0/deployment-integrations/ for deploy examples