Skip to content

Commit

Permalink
fix: properly include adventure in bridge jar (#1557)
Browse files Browse the repository at this point in the history
### Motivation
Our update to fabric loom 1.9.2 resulted in bridge jars without
adventure shaded into it.

### Modification
Moved our class copy to the jar task.

### Result
Adventure is shaded again.
  • Loading branch information
0utplay authored Dec 18, 2024
1 parent 8460c56 commit d88453f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions modules/bridge/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,10 @@ tasks.withType<Jar> {
manifest {
attributes["paperweight-mappings-namespace"] = "mojang"
}
}

tasks.withType<RemapJarTask> {
// depend on adventure helper jar task
dependsOn(":ext:adventure-helper:jar")
// base setup
archiveFileName.set(Files.bridge)

duplicatesStrategy = DuplicatesStrategy.EXCLUDE
// includes all dependencies of runtimeImpl but excludes gson because we don't need it
from(configurations.getByName("runtimeImpl").map { if (it.isDirectory) it else zipTree(it) })
Expand All @@ -67,6 +64,10 @@ tasks.withType<RemapJarTask> {
}
}

tasks.withType<RemapJarTask> {
archiveFileName.set(Files.bridge)
}

loom {
accessWidenerPath.set(project.file("src/main/resources/cloudnet_bridge.accesswidener"))
}
Expand Down

0 comments on commit d88453f

Please sign in to comment.