This repository has been archived by the owner on May 16, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
67 lines (66 loc) · 2.27 KB
/
circle.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
version: 2
jobs:
build:
working_directory: ~/repo
docker:
- image: circleci/android:api-28-alpha
environment:
JAVA_OPTS: -Xmx1536m
GRADLE_OPTS: '-Dorg.gradle.daemon=false -Dorg.gradle.jvmargs="-Xmx1536m -XX:+HeapDumpOnOutOfMemoryError"'
steps:
- checkout
- restore_cache:
key: sdks-licenses-build-tools-extras-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
- restore_cache:
key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
- run:
name: Decrypt secrets
command: ./secrets/secrets.sh decrypt $DECRYPT_SECRETS_PASSWORD
- run:
name: Download Dependencies
command: ./gradlew androidDependencies
- save_cache:
key: sdks-licenses-build-tools-extras-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
paths:
- /opt/android/sdk/licenses
- /opt/android/sdk/build-tools
- /opt/android/sdk/extras
- save_cache:
key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
paths:
- ~/.gradle
- run:
name: Signing Report
command: ./gradlew signingReport
- run:
name: Check
command: |
if [ $CIRCLE_BRANCH = 'master' ] || [ $CIRCLE_BRANCH = 'develop' ]; then
./gradlew --stacktrace ktlintCheck
fi
- run:
name: Test
command: |
if [ $CIRCLE_BRANCH = 'master' ] || [ $CIRCLE_BRANCH = 'develop' ]; then
./gradlew --stacktrace testRelease
else
./gradlew --stacktrace testDebug
fi
- run:
name: Build
command: |
if [ $CIRCLE_BRANCH = 'master' ]; then
./gradlew assembleRelease
./gradlew bundleRelease
elif [ $CIRCLE_BRANCH = 'develop' ]; then
./gradlew assembleBeta
./gradlew bundleBeta
else
./gradlew assembleDebug
fi
- store_artifacts:
path: app/build/reports
destination: reports
- store_artifacts:
path: app/build/outputs
destination: outputs