config.yml 1.2 KB

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