Last active
September 8, 2020 20:51
-
-
Save pavelgordon/cdbe5d1d350590ac1d96f06ffa1bdd0c to your computer and use it in GitHub Desktop.
Build fat-jar/uber-jar(standalone executablejar file with all depencdencies). Run "shadowJar" task from gradle, and then see your jar at build/libs/app-0.0.1-all.jar
This file contains 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 'com.github.johnrengelman.shadow' version '6.0.0' | |
id 'java' | |
} | |
group 'dev.pgordon' | |
version '0.1.0' | |
repositories { | |
mavenCentral() | |
maven { | |
url "https://oss.sonatype.org/content/repositories/snapshots" | |
mavenContent { | |
snapshotsOnly() | |
} | |
} | |
} | |
dependencies { | |
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8" | |
} | |
jar { | |
manifest { | |
attributes 'Main-Class': 'dev.pgordon.MainKt' //replace with your path | |
} | |
from { | |
configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment