-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathcirclecibuild
31 lines (27 loc) · 991 Bytes
/
circlecibuild
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
#!/bin/bash
function waitAVD {
(
local bootanim=""
export PATH=$(dirname $(dirname $(which android)))/platform-tools:$PATH
until [[ "$bootanim" =~ "stopped" ]]; do
sleep 5
bootanim=$(adb -e shell getprop init.svc.bootanim 2>&1)
echo "emulator status=$bootanim"
done
)
}
# Fix the CircleCI path
function getAndroidSDK(){
export PATH="$ANDROID_HOME/platform-tools:$ANDROID_HOME/tools:$PATH"
DEPS="$ANDROID_HOME/installed-dependencies"
if [ ! -e $DEPS ]; then
cp -r /usr/local/android-sdk-linux $ANDROID_HOME &&
echo y | android update sdk -u -a -t android-19 &&
echo y | android update sdk -u -a -t platform-tools &&
echo y | android update sdk -u -a -t build-tools-20.0.0 &&
echo y | android update sdk -u -a -t sys-img-x86-android-19 &&
#echo y | android update sdk -u -a -t addon-google_apis-google-19 &&
echo no | android create avd -n testAVD -f -t android-19 --abi default/x86 &&
touch $DEPS
fi
}