config.yml 1.1 KB

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