Merge pull request #995 from owncloud/navigationDrawer_basic
[pub/Android/ownCloud.git] / setup_env.sh
1 #!/bin/bash -e
2
3
4 function initDefault {
5 git submodule init
6 git submodule update
7 android update lib-project -p owncloud-android-library
8 android update project -p .
9 android update project -p oc_jb_workaround
10 android update test-project -p tests -m ..
11 }
12
13 function initForAnt {
14
15 #Gets the owncloud-android-library
16 git submodule init
17 git submodule update
18
19 #Prepare project android-support-appcompat-v7 ; JAR file is not enough, includes resources
20 android update lib-project -p libs/android-support-appcompat-v7-exploded-aar --target android-16
21
22 #As default it updates the ant scripts
23 android update lib-project -p owncloud-android-library
24 android update project -p .
25 android update project -p oc_jb_workaround
26 android update test-project -p tests -m ..
27 }
28
29 #No args
30 if [ $# -lt 1 ]; then
31 echo "No args found"
32 echo "Usage : $0 [gradle | maven | ant]"
33 exit
34 fi
35
36 #checking args
37 case "$1" in
38
39 "ant")
40 echo "Creating Ant environment"
41 initForAnt
42 ;;
43
44 "gradle") echo "Creating gradle environment"
45 initDefault
46 ;;
47
48 "maven") echo "Creating maven environment"
49 initDefault
50 ;;
51
52 *) echo "Argument not recognized"
53 echo "Usage : $0 [gradle | maven | ant]"
54 ;;
55 esac
56
57 exit