If you want the jar
task to behave normally and also have an additional fatJar
task, use the following:
task fatJar(type: Jar) {
classifier = 'all'
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}
The important part is with jar
. Without it, the classes of this project are not included.