Add custom task which produces fat jar
@@ -14,6 +14,17 @@ jar {
}
}
+
+task customFatJar(type: Jar) {
+ manifest {
+ attributes 'Main-Class': 'com.baeldung.fatjar.Application'
+ }
+ baseName = 'all-in-one-jar'
+ from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
+ with jar
+}
+
+
dependencies{
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25'
compile group: 'org.slf4j', name: 'slf4j-simple', version: '1.7.25'
