setup_env.bat 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. if not exist .\actionbarsherlock (
  17. ::Gets the owncloud-android-library
  18. call git submodule init
  19. call git submodule update
  20. ::Clones the actionbarsherlock and checks-out the right release (4.2.0)
  21. git clone "https://github.com/JakeWharton/ActionBarSherlock.git" "actionbarsherlock"
  22. cd "actionbarsherlock"
  23. git checkout "90939dc3925ffaaa0de269bbbe1b35e274968ea1"
  24. cd ../
  25. call android.bat update project -p actionbarsherlock/library -n ActionBarSherlock --target android-19
  26. call android.bat update lib-project -p owncloud-android-library
  27. call android.bat update project -p .
  28. call android.bat update project -p oc_jb_workaround
  29. copy /Y third_party\android-support-library\android-support-v4.jar actionbarsherlock\library\libs\android-support-v4.jar
  30. call android.bat update test-project -p tests -m ..
  31. )
  32. goto complete
  33. :initDefault
  34. call git submodule init
  35. call git submodule update
  36. call android.bat update lib-project -p owncloud-android-library
  37. call android.bat update project -p .
  38. call android.bat update project -p oc_jb_workaround
  39. call android.bat update test-project -p tests -m ..
  40. goto complete
  41. :invalidInput
  42. echo "Input argument invalid."
  43. echo "Usage: %0 [ant | maven | gradle]."
  44. goto exit
  45. :complete
  46. echo "...setup complete."
  47. goto exit
  48. :exit