Skip to content

Commit 951a35a

Browse files
committed
fix(normal AT logic/paperweight issue): append compile classpath for minecraft ATs
This fixes some issues with JST and forks as there are custom types from the API imported by paper, which arent contained in the mache libraries config and that causes JST to fail to create binary representations for some methods/classes thus not allowing to AT them, this fixes it
1 parent 575a6a0 commit 951a35a

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

paperweight-core/src/main/kotlin/io/papermc/paperweight/core/taskcontainers/MinecraftPatchingTasks.kt

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ import org.gradle.api.Task
3939
import org.gradle.api.file.Directory
4040
import org.gradle.api.file.DirectoryProperty
4141
import org.gradle.api.file.RegularFileProperty
42+
import org.gradle.api.plugins.JavaPlugin
4243
import org.gradle.api.provider.Provider
4344
import org.gradle.api.tasks.TaskContainer
4445
import org.gradle.kotlin.dsl.*
@@ -170,7 +171,10 @@ class MinecraftPatchingTasks(
170171
libraryImports.set(importLibFiles.flatMap { it.outputDir })
171172
atFile.set(mergeCollectedAts.flatMap { it.outputFile })
172173
ats.jst.from(project.configurations.named(JST_CONFIG))
173-
ats.jstClasspath.from(project.configurations.named(MACHE_MINECRAFT_LIBRARIES_CONFIG))
174+
ats.jstClasspath.from(
175+
project.configurations.named(MACHE_MINECRAFT_CONFIG),
176+
project.configurations.named(JavaPlugin.COMPILE_CLASSPATH_CONFIGURATION_NAME)
177+
)
174178
}
175179

176180
applySourcePatches.configure {
@@ -207,8 +211,10 @@ class MinecraftPatchingTasks(
207211
input.set(outputSrc)
208212
patches.set(sourcePatchDir)
209213
gitFilePatches.set(this@MinecraftPatchingTasks.gitFilePatches)
210-
211-
ats.jstClasspath.from(project.configurations.named(MACHE_MINECRAFT_CONFIG))
214+
ats.jstClasspath.from(
215+
project.configurations.named(MACHE_MINECRAFT_CONFIG),
216+
project.configurations.named(JavaPlugin.COMPILE_CLASSPATH_CONFIGURATION_NAME)
217+
)
212218
ats.jst.from(project.configurations.named(JST_CONFIG))
213219
atFile.set(additionalAts.fileExists())
214220
atFileOut.set(additionalAts.fileExists())

0 commit comments

Comments
 (0)