nextcloud-android/setup_env.sh

56 lines
1.4 KiB
Bash
Raw Normal View History

2014-10-28 18:47:28 +03:00
#!/bin/bash -e
function initDefault {
git submodule init
git submodule update
android update lib-project -p owncloud-android-library
android update project -p .
android update project -p oc_jb_workaround
android update test-project -p tests -m ..
}
function initForAnt {
2015-05-26 14:45:35 +03:00
#Gets the owncloud-android-library
git submodule init
git submodule update
#Prepare project android-support-appcompat-v7 ; JAR file is not enough, includes resources
2015-11-28 13:26:58 +03:00
android update lib-project -p libs/android-support-appcompat-v7-exploded-aar --target android-23
android update lib-project -p libs/android-support-design-exploded-aar --target android-23
2016-03-02 16:34:33 +03:00
android update lib-project -p libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar --target android-22
2015-11-28 13:26:58 +03:00
2015-05-26 14:45:35 +03:00
#As default it updates the ant scripts
android update lib-project -p owncloud-android-library
android update project -p .
android update project -p oc_jb_workaround
android update test-project -p tests -m ..
2014-10-28 18:47:28 +03:00
}
#No args
if [ $# -lt 1 ]; then
echo "No args found"
2016-04-07 01:00:46 +03:00
echo "Usage : $0 [gradle | ant]"
2014-10-28 18:47:28 +03:00
exit
fi
#checking args
case "$1" in
"ant")
echo "Creating Ant environment"
initForAnt
;;
"gradle") echo "Creating gradle environment"
initDefault
;;
*) echo "Argument not recognized"
2016-04-07 01:00:46 +03:00
echo "Usage : $0 [gradle | ant]"
2014-10-28 18:47:28 +03:00
;;
esac
exit