I\'ve got a simple project in Gradle 4.6 and would like to make an executable jar of it. I\'ve tried shadow, gradle-fatjar-plugin, gradle-one
The same task can be achieved using Gradle Kotlin DSL in a similar way:
val jar by tasks.getting(Jar::class) {
manifest {
attributes["Main-Class"] = "com.package.YourClass"
}
from(configurations
.runtime
// .get() uncomment this on Gradle 6+
// .files
.map { if (it.isDirectory) it else zipTree(it) })
}