upgrade to 23.1.0 AppCompat and bumping Compile Target to 23 (Android M, needed in...
[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-23-1-0-exploded-aar --target android-23
21 android update lib-project -p libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar --target android-22
22
23 #As default it updates the ant scripts
24 android update lib-project -p owncloud-android-library
25 android update project -p .
26 android update project -p oc_jb_workaround
27 android update test-project -p tests -m ..
28 }
29
30 #No args
31 if [ $# -lt 1 ]; then
32 echo "No args found"
33 echo "Usage : $0 [gradle | maven | ant]"
34 exit
35 fi
36
37 #checking args
38 case "$1" in
39
40 "ant")
41 echo "Creating Ant environment"
42 initForAnt
43 ;;
44
45 "gradle") echo "Creating gradle environment"
46 initDefault
47 ;;
48
49 "maven") echo "Creating maven environment"
50 initDefault
51 ;;
52
53 *) echo "Argument not recognized"
54 echo "Usage : $0 [gradle | maven | ant]"
55 ;;
56 esac
57
58 exit