-
Notifications
You must be signed in to change notification settings - Fork 734
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
1 changed file
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
version: 2 | ||
jobs: | ||
build: | ||
working_directory: ~/code | ||
docker: | ||
- image: circleci/android:api-27-alpha | ||
environment: | ||
JVM_OPTS: -Xmx4G | ||
steps: | ||
- checkout | ||
- restore_cache: | ||
key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }} | ||
- run: | ||
name: Download Dependencies | ||
command: ./gradlew androidDependencies | ||
- save_cache: | ||
paths: | ||
- ~/.gradle | ||
key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }} | ||
- run: | ||
name: Run Tests | ||
command: ./gradlew lint test | ||
- store_test_results: | ||
path: app/build/test-results | ||
destination: test-results/ | ||
- run: | ||
name: Initial build | ||
command: ./gradlew clean assembleRelease --no-daemon --stacktrace | ||
- store_artifacts: | ||
path: app/build/outputs/apk/ | ||
destination: apks/ | ||
- deploy: | ||
name: "Deploy Igniter🐎" | ||
command: | | ||
echo "Branch: ${CIRCLE_BRANCH} , PR: ${CIRCLE_PULL_REQUEST}" | ||
if [ "${CIRCLE_BRANCH}" == "develop" -o "${CIRCLE_PULL_REQUEST}" != "" ]; then | ||
./gradlew crashlyticsUploadDistributionDevelopmentRelease --stacktrace --debug --no-daemon | ||
fi | ||
release=$(cut -c-7 <<< "${CIRCLE_BRANCH}") | ||
if [ "$release" == "release"]; then | ||
./gradlew crashlyticsUploadDistributionProductionRelease --stacktrace --debug --no-daemon | ||
fi |