setup_env.bat 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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 lib-project -p owncloud-android-library
  22. call android.bat update project -p .
  23. call android.bat update project -p oc_jb_workaround
  24. call android.bat update test-project -p tests -m ..
  25. goto complete
  26. :initDefault
  27. call git submodule init
  28. call git submodule update
  29. call android.bat update lib-project -p owncloud-android-library
  30. call android.bat update project -p .
  31. call android.bat update project -p oc_jb_workaround
  32. call android.bat update test-project -p tests -m ..
  33. goto complete
  34. :invalidInput
  35. echo "Input argument invalid."
  36. echo "Usage: %0 [ant | maven | gradle]."
  37. goto exit
  38. :complete
  39. echo "...setup complete."
  40. goto exit
  41. :exit