Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- PROJECT_NAME=$1
- if [ -z "$PROJECT_NAME" ]; then
- echo "Please specify a project name"
- exit 1
- fi
- echo Creating Gradle project in $PWD/$PROJECT_NAME...
- mkdir -p $PROJECT_NAME/src/{main,test}/{java,resources}
- echo "apply plugin: 'java'
- repositories {
- mavenCentral()
- }
- dependencies {
- compile group: 'io.projectreactor', name: 'reactor-core', version: '[3.1,3.2)'
- testCompile group: 'junit', name: 'junit', version: '4.12'
- testCompile('org.assertj:assertj-core:3.11.1')
- testCompile('org.mockito:mockito-core:2.7.22')
- testCompile group: 'pl.pragmatists', name: 'JUnitParams', version: '1.1.0'
- }
- " > $PROJECT_NAME/build.gradle
- echo ".idea
- .gradle
- *.iml
- *.ipr
- *.iws
- out
- build" > $PROJECT_NAME/.gitignore
- cd $PROJECT_NAME
- git init
- git add -- build.gradle .gitignore
- git commit -m "Added build script and .gitignore"
- echo "All done. You can now import the project into your IDE."
Add Comment
Please, Sign In to add comment