Modify jar task from java plugin in order to produce fat-jar
@@ -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'
