From d98e323db8725d0c8425ee6e9225575e98bd8d04 Mon Sep 17 00:00:00 2001 From: Daniel Orr Date: Mon, 16 Dec 2024 19:09:11 +0000 Subject: [PATCH] fix: I went through hell for this commit --- build.gradle | 16 ++++++++++++++-- gradle.properties | 1 + settings.gradle | 1 + 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 8990f72..b1a46e0 100644 --- a/build.gradle +++ b/build.gradle @@ -2,6 +2,7 @@ plugins { id "fabric-loom" version "1.9-SNAPSHOT" id "org.jetbrains.kotlin.jvm" id "maven-publish" + id "com.gradleup.shadow" } version = mod_version @@ -59,10 +60,10 @@ dependencies { include modImplementation ("com.github.yundom:kache:$kache_version") - include modImplementation ("io.javalin:javalin:$javalin_version") include modImplementation ("net.mcbrawls.inject:api:$inject_version") - include modImplementation ("net.mcbrawls.inject:javalin:$inject_version") include modImplementation ("net.mcbrawls.inject:fabric:$inject_version") + include modImplementation ("net.mcbrawls.inject:javalin:$inject_version") + shadow modCompileOnly ("io.javalin:javalin:$javalin_version") testImplementation sourceSets.main.output } @@ -98,6 +99,17 @@ jar { } } +shadowJar { + configurations = [ project.configurations.shadow ] + exclude("META-INF") +} + +remapJar { + dependsOn(shadowJar) + mustRunAfter(shadowJar) + inputFile = file(shadowJar.archivePath) +} + publishing { publications { mavenJava(MavenPublication) { diff --git a/gradle.properties b/gradle.properties index 8bbe944..126a315 100644 --- a/gradle.properties +++ b/gradle.properties @@ -24,3 +24,4 @@ mod_id=audience kache_version=1.0.5 javalin_version=6.3.0 inject_version=3.0.0 +shadow_version=9.0.0-beta4 diff --git a/settings.gradle b/settings.gradle index 0233ca6..7675f96 100644 --- a/settings.gradle +++ b/settings.gradle @@ -13,6 +13,7 @@ pluginManagement { plugins { id "org.jetbrains.kotlin.jvm" version kotlin_version + id "com.gradleup.shadow" version shadow_version } }