-
Notifications
You must be signed in to change notification settings - Fork 1
/
circle.yml
52 lines (44 loc) · 2.11 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
machine:
java:
version: oraclejdk8
environment:
ANDROID_HOME: /usr/local/android-sdk-linux
ANDROID_BUILD_TOOLS: 26.0.0
APPLICATION_ID: com.pager
GRADLE_OPTS: '-Dorg.gradle.jvmargs="-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError"'
JAVA_OPTS: "-Xms518m -Xmx2048m"
_JAVA_OPTIONS: "-Xms512m -Xmx1024m"
dependencies:
pre:
# Remove any leftover lock from previous builds
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
# Make sure we have the sdkmanager available, and update the Android SDK tools if not
- if [ ! -e $ANDROID_HOME/tools/bin/sdkmanager ]; then echo y | android update sdk --no-ui --all --filter tools; fi
# Pre-accept Android SDK components licenses
- mkdir "$ANDROID_HOME/licenses" || true
- echo -e "\n8933bad161af4178b1185d1a37fbf41ea5269c55" > "$ANDROID_HOME/licenses/android-sdk-license"
# Install all the required SDK components
- $ANDROID_HOME/tools/bin/sdkmanager --verbose "platform-tools" "build-tools;"$ANDROID_BUILD_TOOLS "extras;google;m2repository"
override:
# Force Gradle to pre-download dependencies for the module (the default would only be for the root, which is useless)
- if [ -f ./gradlew ]; then ./gradlew dependencies --console=plain --no-daemon;else ./gradlew dependencies --console=plain --no-daemon;fi
cache_directories:
# Android SDK
- /usr/local/android-sdk-linux/tools
- /usr/local/android-sdk-linux/platform-tools
- /usr/local/android-sdk-linux/build-tools
- /usr/local/android-sdk-linux/licenses
- /usr/local/android-sdk-linux/extras/google/m2repository
# Gradle caches
- /home/ubuntu/.gradle/caches/
- /home/ubuntu/.gradle/wrapper/
test:
override:
# start the emulator
- emulator -avd circleci-android22 -no-window:
background: true
parallel: true
# wait for it to have booted
- circle-android wait-for-boot
# run tests against the emulator.
- ./gradlew connectedAndroidTest test -PdisablePreDex