Modify jar task from java plugin in order to produce fat-jar

This commit is contained in:
mkuligowski 2017-12-03 10:56:52 +01:00
parent 3f8fb8dd78
commit b152de4851
1 changed files with 10 additions and 0 deletions

View File

@ -4,6 +4,16 @@ repositories {
mavenCentral()
}
jar {
manifest {
attributes "Main-Class": "com.baeldung.fatjar.Application"
}
from {
configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
}
}
dependencies{
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25'
compile group: 'org.slf4j', name: 'slf4j-simple', version: '1.7.25'