janvladimirmostert
04/10/2019, 6:51 PMtasks.withType<Jar> {
manifest {
attributes(
mapOf(
"Main-Class" to "com.harakati.Application"
)
)
}
archiveClassifier.set("uber")
from(sourceSets.main.get().output)
dependsOn(configurations.runtimeClasspath)
from({
configurations.runtimeClasspath.get().filter { it.name.endsWith("jar") }.map { zipTree(it) }
})
}
just move everything into the tasks.withType<Jar> and it automatically builds the uber jar