Skip to content

Commit

Permalink
fix jarjar being missing from final neoforge jar
Browse files Browse the repository at this point in the history
  • Loading branch information
jpenilla committed Dec 3, 2024
1 parent 9004f12 commit c0b02ea
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions neoforge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -66,24 +66,31 @@ tasks.processResources {
}

tasks.jar {
archiveClassifier = "slim"
archiveClassifier = "dev"
}

tasks.shadowJar {
archiveClassifier = ""
archiveClassifier = "dev-all"
destinationDirectory = layout.buildDirectory.dir("libs")
configurations = [project.configurations.shadow]
relocate 'ca.spottedleaf.concurrentutil', 'ca.spottedleaf.moonrise.libs.ca.spottedleaf.concurrentutil'
relocate 'ca.spottedleaf.yamlconfig', 'ca.spottedleaf.moonrise.libs.ca.spottedleaf.yamlconfig'
relocate 'org.yaml.snakeyaml', 'ca.spottedleaf.moonrise.libs.org.yaml.snakeyaml'
}

tasks.register("productionJar", Zip.class) {
archiveClassifier = ""
destinationDirectory = layout.buildDirectory.dir("libs")
from(tasks.jarJar)
from(zipTree(tasks.shadowJar.archiveFile))
}

tasks.assemble {
dependsOn tasks.shadowJar
dependsOn tasks.productionJar
}

publishMods {
file = shadowJar.archiveFile
file = productionJar.archiveFile
modLoaders = ["neoforge"]

modrinth {
Expand Down

0 comments on commit c0b02ea

Please sign in to comment.