Guest User

Untitled

a guest
Oct 18th, 2018
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. PROJECT_NAME=$1
  4. if [ -z "$PROJECT_NAME" ]; then
  5. echo "Please specify a project name"
  6. exit 1
  7. fi
  8.  
  9. echo Creating Gradle project in $PWD/$PROJECT_NAME...
  10. mkdir -p $PROJECT_NAME/src/{main,test}/{java,resources}
  11.  
  12. echo "apply plugin: 'java'
  13.  
  14. repositories {
  15. mavenCentral()
  16. }
  17.  
  18. dependencies {
  19. compile group: 'io.projectreactor', name: 'reactor-core', version: '[3.1,3.2)'
  20. testCompile group: 'junit', name: 'junit', version: '4.12'
  21. testCompile('org.assertj:assertj-core:3.11.1')
  22. testCompile('org.mockito:mockito-core:2.7.22')
  23. testCompile group: 'pl.pragmatists', name: 'JUnitParams', version: '1.1.0'
  24. }
  25. " > $PROJECT_NAME/build.gradle
  26.  
  27. echo ".idea
  28. .gradle
  29. *.iml
  30. *.ipr
  31. *.iws
  32. out
  33. build" > $PROJECT_NAME/.gitignore
  34.  
  35. cd $PROJECT_NAME
  36. git init
  37. git add -- build.gradle .gitignore
  38. git commit -m "Added build script and .gitignore"
  39.  
  40. echo "All done. You can now import the project into your IDE."
Add Comment
Please, Sign In to add comment