1
- # Java Gradle CircleCI 2.0 configuration file
2
- #
3
- # Check https://circleci.com/docs/2.0/language-java/ for more details
4
- #
5
1
version : 2
6
2
jobs :
7
3
build :
4
+ working_directory : ~/code
8
5
docker :
9
- # specify the version you desire here
10
- - image : circleci/openjdk:8-jdk
11
-
12
- # Specify service dependencies here if necessary
13
- # CircleCI maintains a library of pre-built images
14
- # documented at https://circleci.com/docs/2.0/circleci-images/
15
- # - image: circleci/postgres:9.4
16
-
17
- working_directory : ~/repo
18
-
6
+ - image : circleci/android:api-25-alpha
19
7
environment :
20
- # Customize the JVM maximum heap limit
21
8
JVM_OPTS : -Xmx3200m
22
- TERM : dumb
23
-
24
9
steps :
25
10
- checkout
26
-
27
- # Download and cache dependencies
28
11
- restore_cache :
29
- keys :
30
- - v1-dependencies-{{ checksum "build.gradle" }}
31
- # fallback to using the latest cache if no exact match is found
32
- - v1-dependencies-
33
-
34
- - run : gradle dependencies
35
-
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 : Download Dependencies
18
+ command : ./gradlew androidDependencies
36
19
- save_cache :
37
20
paths :
38
21
- ~/.gradle
39
- key : v1-dependencies-{{ checksum "build.gradle" }}
40
-
41
- # run tests!
42
- - run : gradle test
43
-
44
-
45
-
22
+ key : jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
23
+ - run :
24
+ name : Run Tests
25
+ command : ./gradlew lint test
26
+ - store_artifacts :
27
+ path : app/build/reports
28
+ destination : reports
29
+ - store_test_results :
30
+ path : app/build/test-results
0 commit comments