nextcloud-android/setup_env.sh

60 lines
1.5 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"
echo "Usage : $0 [gradle | maven | ant]"
exit
fi
#checking args
case "$1" in
"ant")
echo "Creating Ant environment"
initForAnt
;;
"gradle") echo "Creating gradle environment"
initDefault
;;
"maven") echo "Creating maven environment"
initDefault
;;
*) echo "Argument not recognized"
echo "Usage : $0 [gradle | maven | ant]"
;;
esac
exit