Skip to content

Commit 711e971

Browse files
committed
Fix shadowJar config
1 parent daa4481 commit 711e971

1 file changed

Lines changed: 20 additions & 9 deletions

File tree

build.gradle

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id 'net.fabricmc.fabric-loom' version "${loom_version}"
3-
id 'com.gradleup.shadow' version '9.0.0-beta10'
3+
id 'com.gradleup.shadow' version '9.3.1'
44
}
55

66
version = project.mod_version
@@ -82,6 +82,25 @@ tasks.withType(JavaCompile).configureEach {
8282
it.options.release = 25
8383
}
8484

85+
tasks.shadowJar {
86+
dependsOn(jar)
87+
88+
setArchiveClassifier("")
89+
configurations = [project.configurations.shadow]
90+
relocate("org.jgrapht", "falseresync.shadowed.jgrapht")
91+
relocate("org.jheaps", "falseresync.shadowed.jheaps")
92+
minimize()
93+
exclude('.cache/**')
94+
from("LICENSE") {
95+
rename { "${it}_${project.base.archivesName.get()}"}
96+
}
97+
}
98+
99+
tasks.assemble {
100+
dependsOn(shadowJar)
101+
}
102+
103+
85104
java {
86105
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
87106
// if it is present.
@@ -90,12 +109,4 @@ java {
90109

91110
sourceCompatibility = JavaVersion.VERSION_25
92111
targetCompatibility = JavaVersion.VERSION_25
93-
}
94-
95-
jar {
96-
inputs.property "archivesName", project.base.archivesName
97-
98-
from("LICENSE") {
99-
rename { "${it}_${inputs.properties.archivesName}"}
100-
}
101112
}

0 commit comments

Comments
 (0)