From 765ab7f8d1393c7c6d89209b7b8b4a882d886522 Mon Sep 17 00:00:00 2001 From: Xeovalyte Date: Sat, 12 Aug 2023 12:11:57 +0200 Subject: [PATCH] shadowed dependency --- mod/build.gradle | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/mod/build.gradle b/mod/build.gradle index 494d665..8da9189 100644 --- a/mod/build.gradle +++ b/mod/build.gradle @@ -1,6 +1,7 @@ plugins { id 'fabric-loom' version '1.3-SNAPSHOT' id 'maven-publish' + id 'com.github.johnrengelman.shadow' version '7.0.0' } version = project.mod_version @@ -42,7 +43,7 @@ dependencies { // These are included in the Fabric API production distribution and allow you to update your mod to the latest modules at a later more convenient time. // modImplementation "net.fabricmc.fabric-api:fabric-api-deprecated:${project.fabric_version}" - modImplementation "com.sparkjava:spark-core:2.9.4" + shadow(implementation("com.sparkjava:spark-core:2.9.4")) } processResources { @@ -73,6 +74,17 @@ jar { } } +shadowJar { + configurations = [project.configurations.shadow] + archiveClassifier.set("dev") + relocate "net.objecthunter", "de.siphalor.spiceoffabric.shadow.net.objecthunter" +} + +remapJar { + dependsOn(shadowJar) + inputFile = tasks.shadowJar.archiveFile +} + // configure the maven publication publishing { publications { @@ -88,4 +100,4 @@ publishing { // The repositories here will be used for publishing your artifact, not for // retrieving dependencies. } -} \ No newline at end of file +}