File tree Expand file tree Collapse file tree 1 file changed +28
-15
lines changed
Expand file tree Collapse file tree 1 file changed +28
-15
lines changed Original file line number Diff line number Diff line change @@ -4,46 +4,60 @@ aliases:
44 prepare_gradle : &prepare_gradle
55 run :
66 name : Accept all licenses
7- command : |
8- printf "y\ny\ny\ny\ny\ny\ny\ny\ny\ny\n" | sdkmanager --licenses
7+ command : printf "y\ny\ny\ny\ny\ny\ny\ny\ny\ny\n" | sdkmanager --licenses
98
10- build_settings : &build_settings
9+ restore_dependensies : &restore_dependencies
10+ restore_cache :
11+ key : gradle-dependencies-{{ checksum "build.gradle" }}
12+
13+ save_dependencies : &save_dependencies
14+ save_cache :
15+ paths :
16+ - ~/.gradle
17+ key : gradle-dependencies-{{ checksum "build.gradle" }}
18+
19+ init_job : &init_job
1120 working_directory : ~/code/as
1221 docker :
13- - image : circleci/android:api-28
22+ - image : circleci/android:api-28
23+
24+ make_checkout : &make_checkout
25+ checkout :
26+ path : ~/code
1427
1528jobs :
1629 build :
17- << : *build_settings
30+ << : *init_job
1831 steps :
19- - checkout :
20- path : ~/code
32+ - *make_checkout
2133 - *prepare_gradle
34+ - *restore_dependencies
2235 - run :
2336 name : Build debug APK
2437 command : |
2538 ./gradlew assembleDebug
2639 ./gradlew assembleDebugAndroidTest
2740 - save_cache :
2841 paths :
29- - ~/.gradle
3042 - build/outputs
3143 key : apk-build-{{ .Environment.CIRCLE_SHA1 }}
3244 - store_artifacts :
3345 path : build/outputs/apk/
3446 destination : apk
3547
3648 test_local :
37- << : *build_settings
49+ << : *init_job
3850 steps :
39- - checkout :
40- path : ~/code
51+ - *make_checkout
4152 - *prepare_gradle
53+ - *restore_dependencies
4254 - restore_cache :
43- key : apk-build-{{ .Environment.CIRCLE_SHA1 }}
55+ keys :
56+ - apk-build-{{ .Environment.CIRCLE_SHA1 }}
4457 - run :
4558 name : Download Dependencies
4659 command : ./gradlew androidDependencies
60+ - *save_dependencies
4761 - run :
4862 name : Run local tests
4963 command : ./gradlew test
5468 path : build/test-results
5569
5670 test_instrumented :
57- << : *build_settings
71+ << : *init_job
5872 steps :
59- - checkout :
60- path : ~/code
73+ - *make_checkout
6174 - restore_cache :
6275 key : apk-build-{{ .Environment.CIRCLE_SHA1 }}
6376 - run :
You can’t perform that action at this time.
0 commit comments