config.yml 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. version: 2
  2. jobs:
  3. build:
  4. branches:
  5. only:
  6. - master
  7. working_directory: ~/code
  8. docker:
  9. - image: circleci/android:api-29
  10. environment:
  11. JVM_OPTS: -Xmx3200m
  12. steps:
  13. - checkout
  14. - restore_cache:
  15. key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
  16. - run:
  17. name: Chmod permissions #if permission for Gradlew Dependencies fail, use this.
  18. command: sudo chmod +x ./gradlew
  19. - run:
  20. name: Run build
  21. command: export TERM=${TERM:-dumb} && ./gradlew clean build
  22. - run:
  23. name: Download Dependencies
  24. command: ./gradlew androidDependencies
  25. - save_cache:publish task as the last step in your config.yml file.
  26. -
  27. paths:
  28. - ~/.gradlepublish task as the last step in your config.yml file.
  29. -
  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