Skip to content

Commit

Permalink
configure circleci
Browse files Browse the repository at this point in the history
make circleci run
  • Loading branch information
KunagisaYuki committed Dec 21, 2018
1 parent c976563 commit 624856b
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .circleci/config.yml
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

0 comments on commit 624856b

Please sign in to comment.