task fatJar type Jar baseName project name -all from configurations co

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
task fatJar(type: Jar) {
baseName = project.name + '-all'
from (configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }){
exclude 'META-INF/MANIFEST.MF'
exclude 'META-INF/*.SF'
exclude 'META-INF/*.DSA'
exclude 'META-INF/*.RSA'
}
with jar
manifest.attributes("Main-Class":"server.MainRunner")
}