Skip to content

Instantly share code, notes, and snippets.

@namuan
Forked from Dierk/build.gradle
Last active December 23, 2015 02:59
Show Gist options
  • Save namuan/6570869 to your computer and use it in GitHub Desktop.
Save namuan/6570869 to your computer and use it in GitHub Desktop.
apply plugin:'groovy'
apply plugin:'idea'
apply plugin:'application'
apply plugin: 'shadow'
buildscript {
repositories {
maven {
name 'Shadow'
url 'http://dl.bintray.com/content/johnrengelman/gradle-plugins'
}
}
dependencies {
classpath 'org.gradle.plugins:shadow:0.7.4'
}
}
shadow {
exclude 'META-INF/*.DSA'
exclude 'META-INF/*.RSA'
}
version = '0.1'
mainClassName = "com.example.Main"
jar {
manifest {
attributes "Implementation-Title": "Main Class"
attributes "Implementation-Version": version
attributes 'Main-Class': mainClassName
}
}
repositories {
mavenCentral()
}
dependencies {
compile 'org.codehaus.groovy:groovy-all:2.1.3'
}
task makeDirs(description:'make all dirs for project setup') << {
def sources = [sourceSets.main, sourceSets.test]
sources*.allSource*.srcDirs.flatten().each { File srcDir ->
println "making $srcDir"
srcDir.mkdirs()
}
}
task wrap(type:Wrapper, description:"create a gradlew") {
gradleVersion = '1.7'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment