File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed
Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change 1+ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
2+
3+ plugins {
4+ alias libs. plugins. shadow
5+ }
6+
17dependencies {
28 api libs. maven. artifact
39 api libs. gson
@@ -7,3 +13,15 @@ dependencies {
713 api libs. slf4j. api
814 runtimeOnly libs. slf4j. simple
915}
16+
17+ // NOTE: This shadow jar cannot have relocation as consuming projects would be unaware of the package changes of API dependencies.
18+ // You should not use this. This is for the Gradle plugin, which uses it in an classloader-isolated task action.
19+ tasks. named(' shadowJar' , ShadowJar ) {
20+ archiveClassifier = ' fatjar'
21+ }
22+
23+ // TODO [JarJarMetadata] Delete once the following PR is merged and included in a release
24+ // https://github.com/GradleUp/shadow/pull/1766
25+ tasks. named({' assemble' . equals(it)} as Spec<String > ). configureEach {
26+ it. dependsOn(tasks. named(' shadowJar' , ShadowJar ))
27+ }
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ dependencyResolutionManagement {
3232 plugin ' gradleutils' , ' net.minecraftforge.gradleutils' version ' 3.3.0'
3333 plugin ' changelog' , ' net.minecraftforge.changelog' version ' 3.1.1'
3434 plugin ' licenser' , ' net.minecraftforge.licenser' version ' 1.2.0'
35+ plugin ' shadow' , ' com.gradleup.shadow' version ' 9.1.1-SNAPSHOT'
3536
3637 library ' maven-artifact' , ' org.apache.maven' , ' maven-artifact' version ' 3.8.1'
3738
You can’t perform that action at this time.
0 commit comments