Last active
December 15, 2015 20:00
-
-
Save cb372/5315842 to your computer and use it in GitHub Desktop.
Gradle boilerplate generator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
content=$(cat <<EOF | |
buildscript { | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
classpath 'eu.appsatori:gradle-fatjar-plugin:0.2-rc1' | |
} | |
} | |
apply plugin: 'java' | |
apply plugin: 'idea' | |
apply plugin: 'maven' | |
apply plugin: 'fatjar' | |
group = "com.github.cb372" | |
version = "0.1" | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
compile group: "commons-lang", name: "commons-lang", version: "3.1" | |
compile group: "com.google.guava", name: "guava", version: "14.0.1" | |
compile group: "com.google.code.findbugs", name: "jsr305", version: "1.3.9" | |
testCompile group: "junit", name: "junit", version: "4.11" | |
testCompile group: "org.mockito", name: "mockito-core", version: "1.8.1" | |
} | |
task sourcesJar(type: Jar, dependsOn: classes) { | |
classifier = 'sources' | |
from sourceSets.main.allSource | |
} | |
artifacts { | |
archives sourcesJar | |
} | |
EOF) | |
echo "$content" > build.gradle | |
content=$(cat <<EOF | |
.gradle | |
build | |
out | |
.idea | |
*.ipr | |
*.iml | |
*.iws | |
EOF) | |
echo "$content" >> .gitignore | |
mkdir -p src/main/java/com/github/cb372 | |
mkdir -p src/main/resources/com/github/cb372 | |
mkdir -p src/test/java/com/github/cb372 | |
mkdir -p src/test/resources/com/github/cb372 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment