Skip to content

Commit f93aa30

Browse files
committed
fix: append the mache minecraft jar to JST's classpath
fixes more binary representation issues
1 parent c8e472c commit f93aa30

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

paperweight-core/src/main/kotlin/io/papermc/paperweight/core/PaperweightCore.kt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@ import io.papermc.paperweight.core.extension.PaperweightCoreExtension
2828
import io.papermc.paperweight.core.taskcontainers.CoreTasks
2929
import io.papermc.paperweight.core.taskcontainers.DevBundleTasks
3030
import io.papermc.paperweight.core.taskcontainers.PaperclipTasks
31+
import io.papermc.paperweight.core.tasks.SetupForkUpstreamSources
3132
import io.papermc.paperweight.core.tasks.patching.ApplyBasePatches
3233
import io.papermc.paperweight.core.tasks.patching.ApplyFilePatches
34+
import io.papermc.paperweight.core.tasks.patching.RebuildFilePatches
3335
import io.papermc.paperweight.core.tasks.patchroulette.PatchRouletteTasks
3436
import io.papermc.paperweight.core.util.coreExt
3537
import io.papermc.paperweight.core.util.createBuildTasks
@@ -51,6 +53,7 @@ import org.gradle.api.tasks.Delete
5153
import org.gradle.api.tasks.SourceSet
5254
import org.gradle.api.tasks.bundling.AbstractArchiveTask
5355
import org.gradle.kotlin.dsl.*
56+
import org.gradle.kotlin.dsl.withType
5457

5558
abstract class PaperweightCore : Plugin<Project> {
5659
@get:Inject
@@ -196,6 +199,17 @@ abstract class PaperweightCore : Plugin<Project> {
196199
mache.get().addRepositories(this)
197200
mache.get().addDependencies(this)
198201

202+
// attach the mache minecraft jar so JST can properly create binary representations
203+
target.tasks.withType<SetupForkUpstreamSources>().configureEach {
204+
dependsOn(target.tasks.named("macheRemapJar"))
205+
ats.jstClasspath.from(target.configurations.named(MACHE_MINECRAFT_CONFIG))
206+
}
207+
208+
target.tasks.withType<RebuildFilePatches>().configureEach {
209+
dependsOn(target.tasks.named("macheRemapJar"))
210+
ats.jstClasspath.from(target.configurations.named(MACHE_MINECRAFT_CONFIG))
211+
}
212+
199213
tasks.afterEvaluate()
200214

201215
devBundleTasks.configureAfterEvaluate(

0 commit comments

Comments
 (0)