config.yml 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. version: 2
  2. jobs:
  3. build:
  4. branches:
  5. only:
  6. - master
  7. working_directory: ~/code
  8. docker:
  9. - image: circleci/android:api-28
  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:
  26. paths:
  27. - ~/.gradle
  28. key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
  29. - run:
  30. name: Run Tests
  31. command: ./gradlew lint test
  32. - store_artifacts:
  33. path: app/build/reports
  34. destination: reports
  35. - store_test_results:
  36. path: app/build/test-results
  37. # See https://circleci.com/docs/2.0/deployment-integrations/ for deploy examples