forked from halfhp/androidplot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.yml
More file actions
103 lines (81 loc) · 2.77 KB
/
config.yml
File metadata and controls
103 lines (81 loc) · 2.77 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# Java Gradle CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-java/ for more details
#
version: 2
general:
branches:
only:
#- circleci
jobs:
build:
docker:
# specify the version you desire here
#- image: circleci/openjdk:8-jdk
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
- image: circleci/android:api-28-alpha
working_directory: ~/repo
environment:
# Customize the JVM maximum heap limit
JVM_OPTS: -Xmx3200m
TERM: dumb
# KEYSTORE: ${CIRCLE_WORKING_DIRECTORY}/sigining.keystore
# PUBLISHER_ACCT_JSON_FILE: ${CIRCLE_WORKING_DIRECTORY}/publisher_profile.json
steps:
- checkout
- run: echo 'export KEYSTORE=${HOME}/repo/sigining.keystore' >> $BASH_ENV
- run: echo 'export PUBLISHER_ACCT_JSON_FILE=${HOME}/repo/publisher_profile.json' >> $BASH_ENV
# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "build.gradle" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
# Get private keys etc
- run: ./misc/download_keystore.sh
- run: ./misc/inject_circle_build_number.sh
- run: ./gradlew dependencies
- save_cache:
paths:
- ~/.m2
key: v1-dependencies-{{ checksum "build.gradle" }}
# run tests & code coc!
- run: ./gradlew testDebug jacocoTestReportDebug
# build release
- run: ./gradlew assembleRelease
# javadoc
- run: ./gradlew javadoc
# trigger codecod.io
- run: bash <(curl -s https://codecov.io/bash)
- store_artifacts:
path: androidplot-core/build/outputs/aar/
destination: aar
- store_artifacts:
path: demoapp/build/outputs/apk/
destination: apk
- store_artifacts:
path: androidplot-core/build/reports/jacoco/debug/
destination: coverage_report
- store_artifacts:
path: androidplot-core/build/reports/tests/
destination: test_results
- store_artifacts:
path: androidplot-core/build/docs/javadoc
destination: javadoc
- store_test_results:
path: androidplot-core/build/test-results/
- deploy:
name: "Deploy to Bintray"
command: |
if [ "${CIRCLE_BRANCH}" == "master" ];
then ./gradlew bintrayUpload;
fi
- deploy:
name: "Deploy to Google Play"
command: |
if [ "${CIRCLE_BRANCH}" == "master" ];
then
./misc/download_google_publisher_json.sh;
./gradlew publishApkRelease
fi