Created
May 1, 2025 18:32
-
-
Save ahndmal/b4659c33450f7be69d8a43d287298cc5 to your computer and use it in GitHub Desktop.
gradle-jar-as-exec.kts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tasks.jar { | |
manifest { | |
attributes["Main-Class"] = "com.andmal.Main" | |
} | |
duplicatesStrategy = DuplicatesStrategy.EXCLUDE | |
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