From fcbb5f63ef4aaa57982539b960104f6167eba40e Mon Sep 17 00:00:00 2001 From: buthed010203 Date: Tue, 1 Nov 2022 23:12:19 -0400 Subject: [PATCH] Fix jar not including dependencies --- build.gradle.kts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 6036798..6dfe5c4 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -3,8 +3,8 @@ plugins { java } -sourceSets["main"].kotlin.srcDirs("src") -sourceSets["main"].java.srcDirs("src") +sourceSets["main"].kotlin.srcDir("src") +sourceSets["main"].java.srcDir("src") java { targetCompatibility = JavaVersion.VERSION_1_8 @@ -21,4 +21,12 @@ dependencies { compileOnly("com.github.anuken.mindustryjitpack:core:v140") annotationProcessor("com.github.Anuken:jabel:0.9.0") +} + +tasks.jar { + from(configurations.runtimeClasspath.get().map { if (it.isDirectory()) it else zipTree(it) }) + from(rootDir){ + include("plugin.hjson") + } + duplicatesStrategy = DuplicatesStrategy.EXCLUDE } \ No newline at end of file