Skip to content

Instantly share code, notes, and snippets.

@grndvl1
Created November 8, 2023 21:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save grndvl1/c5fc0c4edffeee44b285b88fe751220f to your computer and use it in GitHub Desktop.
Save grndvl1/c5fc0c4edffeee44b285b88fe751220f to your computer and use it in GitHub Desktop.
Fat Jar or Jar file for Java with all dependencies and Manifest
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