build-android-project.sh 620 B

1234567891011121314151617181920212223
  1. #!/bin/bash
  2. # ---------- ---------- ---------- ---------- ---------- ----------
  3. #TODO: Refactor for plugins.
  4. # ---------- ---------- ---------- ---------- ---------- ----------
  5. #get the android sdk
  6. #then get ant
  7. #sudo apt-get install -y ant
  8. name=$1
  9. path=$2
  10. target=${3:-"android-25"}
  11. package=${4:-"community.peers.hundreds"}
  12. activity=${5:-"MainActivity"}
  13. pathToAndroid=plugins/path-to-android.sh
  14. android=$([ -e ${pathToAndroid} ] && echo $(${pathToAndroid}) || (echo "android"))
  15. echo ${android}
  16. ${android} create project --name ${name} --path ${path} --target ${target} --package ${package} --activity ${activity}