-
Notifications
You must be signed in to change notification settings - Fork 49
/
install-dependencies.sh
executable file
·37 lines (26 loc) · 1.16 KB
/
install-dependencies.sh
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
#!/bin/bash
# Fix the CircleCI path
export PATH="$ANDROID_HOME/platform-tools:$ANDROID_HOME/tools:$PATH"
DEPS="$ANDROID_HOME/installed-dependencies"
#Check ENV
echo ANDROID_HOME = $ANDROID_HOME
echo DEPS = $DEPS
echo "List android SDK packages available for installation"
android list sdk -e
# Use android list sdk -e -a in order to get all the available packages on Android SDK Manager
if [ ! -e $DEPS ]; then
cp -r /usr/local/android-sdk-linux $ANDROID_HOME &&
export PATH="$ANDROID_HOME/platform-tools:$ANDROID_HOME/tools:$PATH" &&
which android &&
echo y | android update sdk -u -a -t platform-tools &&
echo y | android update sdk -u -a -t tools &&
echo y | android update sdk -u -a -t android-21 &&
echo y | android update sdk -u -a -t build-tools-21.1.2 &&
echo y | android update sdk -u -a -t extra-google-google_play_services &&
echo y | android update sdk -u -a -t extra-android-m2repository &&
echo y | android update sdk -u -a -t extra-android-support &&
echo y | android update sdk -u -a -t extra-google-m2repository &&
# DO NOT CREATE EMULATOR FOR THE MOMENT
# echo n | android create avd -n testing -f -t android-21 &&
touch $DEPS
fi