Created
November 8, 2023 21:52
-
-
Save grndvl1/c5fc0c4edffeee44b285b88fe751220f to your computer and use it in GitHub Desktop.
Fat Jar or Jar file for Java with all dependencies and Manifest
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
plugins { | |
id("java") | |
id("application") | |
} | |
version = "1.0.0" | |
repositories { | |
mavenCentral() | |
maven { setUrl("https://jitpack.io") } | |
} | |
dependencies { | |
implementation("org.json:json:20230227") | |
implementation("com.github.codemonstur:simplexml:3.0.0") | |
} | |
tasks.withType<Jar> { | |
manifest { | |
attributes["Main-Class"] = "UpdateTcmTestCycle" | |
} | |
archiveBaseName.set("${rootProject.name}") | |
from(configurations.runtimeClasspath.get().map { if (it.isDirectory) it else zipTree(it) }) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment