Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save Ingwersaft/68d3ff19abc2ffcf73e61d23b6748a02 to your computer and use it in GitHub Desktop.

Select an option

Save Ingwersaft/68d3ff19abc2ffcf73e61d23b6748a02 to your computer and use it in GitHub Desktop.
gradle kotlin dsl: runnable uber jar
tasks.withType<Jar> {
manifest {
attributes["Main-Class"] = "<todo>
}
from(configurations.runtime
.filterNot { it.path.endsWith(".pom") }
.map {
if (it.isDirectory) {
it
} else {
zipTree(it)
}
}) {
exclude("META-INF/*.SF")
exclude("META-INF/*.DSA")
exclude("META-INF/*.RSA")
exclude("**/pom.xml")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment