setup_env.bat 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. @echo off
  2. :: Use argument to decide which build system should be used
  3. if "%1" == "gradle" goto initForGradle
  4. if "%1" == "maven" goto initForMaven
  5. if "%1" == "ant" goto initForAnt
  6. goto invalidInput
  7. :initForGradle
  8. echo "Executing Gradle setup..."
  9. goto initDefault
  10. :initForMaven
  11. echo "Executing Maven setup..."
  12. goto initDefault
  13. :initForAnt
  14. echo "Executing Ant setup..."
  15. ::If the directory exists the script has already been executed
  16. ::Gets the owncloud-android-library
  17. call git submodule init
  18. call git submodule update
  19. call android.bat update project -p libs/android-support-appcompat-v7-exploded-aar --target android-23
  20. call android.bat update project -p libs/android-support-design-exploded-aar --target android-23
  21. call android.bat update project -p libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar --target android-22
  22. call android.bat update lib-project -p owncloud-android-library
  23. call android.bat update project -p .
  24. call android.bat update project -p oc_jb_workaround
  25. call android.bat update test-project -p tests -m ..
  26. goto complete
  27. :initDefault
  28. call git submodule init
  29. call git submodule update
  30. call android.bat update lib-project -p owncloud-android-library
  31. call android.bat update project -p .
  32. call android.bat update project -p oc_jb_workaround
  33. call android.bat update test-project -p tests -m ..
  34. goto complete
  35. :invalidInput
  36. echo "Input argument invalid."
  37. echo "Usage: %0 [ant | maven | gradle]."
  38. goto exit
  39. :complete
  40. echo "...setup complete."
  41. goto exit
  42. :exit