Skip to content

Instantly share code, notes, and snippets.

@ahndmal
Last active November 20, 2025 14:18
Show Gist options
  • Select an option

  • Save ahndmal/a90732e9fa579fb89896ff353867d815 to your computer and use it in GitHub Desktop.

Select an option

Save ahndmal/a90732e9fa579fb89896ff353867d815 to your computer and use it in GitHub Desktop.
plugins {
java
}
version = "1.0.0"
repositories {
mavenCentral()
}
dependencies {
implementation("commons-io:commons-io:2.6")
}
tasks.register<Jar>("uberJar") {
archiveClassifier = "uber"
manifest {
attributes["Main-Class"] = "org.example.AppKt"
}
from(sourceSets.main.get().output)
dependsOn(configurations.runtimeClasspath)
from({
configurations.runtimeClasspath.get().filter { it.name.endsWith("jar") }.map { zipTree(it) }
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment