From a108ad4186813dc2bfc0fec4ffdf5855e11223bb Mon Sep 17 00:00:00 2001 From: Gwendal Date: Wed, 8 Aug 2018 00:08:17 +0200 Subject: [PATCH] Add gradle task to build jar with all dependencies --- build.gradle | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/build.gradle b/build.gradle index cd2ccf7..cd4c500 100644 --- a/build.gradle +++ b/build.gradle @@ -22,4 +22,14 @@ compileTestKotlin { kotlinOptions { jvmTarget = "1.8" } +} + +//create a single Jar with all dependencies +task fatJar(type: Jar) { + manifest { + attributes 'Main-Class': 'bandcampcollectiondownloader.BandcampCollectionDownloaderKt' + } + baseName = project.name + '-all' + from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } } + with jar } \ No newline at end of file