Skip to content

Instantly share code, notes, and snippets.

@Qamar4P
Last active April 24, 2019 10:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Qamar4P/ce2c3d113ffa966a0915bbd1628e8308 to your computer and use it in GitHub Desktop.
Save Qamar4P/ce2c3d113ffa966a0915bbd1628e8308 to your computer and use it in GitHub Desktop.
CircleCI configuration file for Android Studio builds that works
version: 2
jobs:
build:
working_directory: ~/code
docker:
- image: circleci/android:api-26
environment:
JVM_OPTS: -Xmx3200m
steps:
- checkout
- restore_cache:
key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
- run:
name: Chmod permissions
command: sudo chmod +x ./gradlew
- run:
name: Download Dependencies
command: ./gradlew androidDependencies
- run:
name: Run Unit Tests
command: ./gradlew test
# - run:
# name: Run Linters
# command: ./gradlew check
- run:
name: Build
command: ./gradlew assemble
- store_artifacts:
path: app/build/outputs/apk
destination: artifact-files
- store_test_results:
path: app/build/test-results
destination: artifact-test-results
- save_cache:
paths:
- ~/.gradle
key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment