/
config.yml
45 lines (42 loc) · 1.44 KB
/
config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
version: 2
jobs:
build:
docker:
- image: circleci/android:api-29
working_directory: ~/repo
environment:
GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError -XX:MaxPermSize=512m"
steps:
- checkout
- restore_cache:
key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}-{{ checksum "library/build.gradle" }}
- run:
name: Update Android SDK
command: yes | sdkmanager --update || true
- run:
name: Install Android SDK Packages
command: yes | sdkmanager --install "build-tools;29.0.2" "tools" "platform-tools" "platforms;android-29" || true
- run:
name: Download Dependencies
command: ./gradlew androidDependencies
- save_cache:
key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}-{{ checksum "library/build.gradle" }}
paths:
- ~/.gradle
- run:
name: Run Klint on app module
command: ./gradlew :app:ktlint
when: always
- run:
name: Run Klint on library module
command: ./gradlew :library:ktlint
when: always
- run:
name: Run Unit Tests
command: ./gradlew test
when: always
- store_artifacts:
path: app/build/reports
destination: reports
- store_test_results:
path: app/build/test-results