Commit for the PR
[pub/Android/ownCloud.git] / setup_env.bat
1 @echo off
2
3 :: Use argument to decide which build system should be used
4 if "%1" == "gradle" goto initForGradle
5 if "%1" == "maven" goto initForMaven
6 if "%1" == "ant" goto initForAnt
7 goto invalidInput
8
9 :initForGradle
10 echo "Executing Gradle setup..."
11 goto initDefault
12
13 :initForMaven
14 echo "Executing Maven setup..."
15 goto initDefault
16
17 :initForAnt
18 echo "Executing Ant setup..."
19 ::If the directory exists the script has already been executed
20 if not exist .\actionbarsherlock (
21
22 ::Gets the owncloud-android-library
23 call git submodule init
24 call git submodule update
25
26 ::Clones the actionbarsherlock and checks-out the right release (4.2.0)
27 git clone "https://github.com/JakeWharton/ActionBarSherlock.git" "actionbarsherlock"
28 cd "actionbarsherlock"
29 git checkout "90939dc3925ffaaa0de269bbbe1b35e274968ea1"
30 cd ../
31
32 call android.bat update project -p actionbarsherlock/library -n ActionBarSherlock --target android-19
33 call android.bat update lib-project -p owncloud-android-library
34 call android.bat update project -p .
35 call android.bat update project -p oc_jb_workaround
36 copy /Y third_party\android-support-library\android-support-v4.jar actionbarsherlock\library\libs\android-support-v4.jar
37 call android.bat update test-project -p tests -m ..
38 )
39 goto complete
40
41 :initDefault
42 call git submodule init
43 call git submodule update
44 call android.bat update lib-project -p owncloud-android-library
45 call android.bat update project -p .
46 call android.bat update project -p oc_jb_workaround
47 call android.bat update test-project -p tests -m ..
48 goto complete
49
50 :invalidInput
51 echo "Input argument invalid."
52 echo "Usage: %0 [ant | maven | gradle]."
53 goto exit
54
55 :complete
56 echo "...setup complete."
57 goto exit
58
59 :exit