Skip to content

Instantly share code, notes, and snippets.

@lbalmaceda
Created March 15, 2017 17:32
Show Gist options
  • Save lbalmaceda/097133f07bd407e6cfca4425da4ab33b to your computer and use it in GitHub Desktop.
Save lbalmaceda/097133f07bd407e6cfca4425da4ab33b to your computer and use it in GitHub Desktop.
CircleCI script for Android builds
#
# Build configuration for Circle CI
#
machine:
environment:
ANDROID_HOME: /usr/local/android-sdk-linux
GRADLE_OPTS: '-Dorg.gradle.jvmargs="-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError"'
_JAVA_OPTIONS: "-Xms512m -Xmx1024m"
ANDROID_API_LEVEL: 25
ANDROID_BUILD_TOOLS_VERSION: 25.0.2
java:
version: oraclejdk8
dependencies:
cache_directories:
- ~/.gradle
- ~/.android
- /usr/local/android-sdk-linux/extras
pre:
- if [ ! -d "$ANDROID_HOME/tools" ]; then echo y | android update sdk --no-ui --all --filter "tools"; fi
- if [ ! -d "$ANDROID_HOME/build-tools/$ANDROID_BUILD_TOOLS_VERSION" ]; then echo y | android update sdk --no-ui --all --filter "build-tools-$ANDROID_BUILD_TOOLS_VERSION"; fi
- if [ ! -d "$ANDROID_HOME/platforms/android-$ANDROID_API_LEVEL" ]; then echo y | android update sdk --no-ui --all --filter "android-$ANDROID_API_LEVEL"; fi
- if [ ! -d "$ANDROID_HOME/add-ons/addon-google_apis-google-$ANDROID_API_LEVEL" ]; then echo y | android update sdk --no-ui --all --filter "addon-google_apis-google-$ANDROID_API_LEVEL"; fi
- echo y | android update sdk --no-ui --all --filter "extra-google-m2repository"
- echo y | android update sdk --no-ui --all --filter "extra-android-m2repository"
- echo y | android update sdk --no-ui --all --filter "extra-google-google_play_services"
test:
override:
- ./gradlew clean test --continue --console=plain
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment