Package net.fabricmc.loom.pipeline
Class MergeLegacyPatchedJarTask
java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
net.fabricmc.loom.pipeline.MergeLegacyPatchedJarTask
- All Implemented Interfaces:
Comparable<org.gradle.api.Task>,org.gradle.api.internal.DynamicObjectAware,org.gradle.api.internal.TaskInternal,org.gradle.api.Named,org.gradle.api.plugins.ExtensionAware,org.gradle.api.Task,org.gradle.util.Configurable<org.gradle.api.Task>
@CacheableTask
public abstract class MergeLegacyPatchedJarTask
extends org.gradle.api.DefaultTask
把 legacy Forge 的 client / server patched jar 合并成一份 merged jar.
它取代 MinecraftLegacyPatchedProvider.mergeJars 里那段配置期逻辑。
两个易错点(与配置期逐字保持一致)
enableSyntheticParamsOffset():Forge 补丁产生的合成参数偏移要在这里补正, 否则运行期参数注解的索引整体错位;- 合并后要过
SideAnnotationMerger:JarMerger 会写上 Fabric 风格的 Sided 注解, 而 Forge 补丁自己也写了一套。保留后者(它不需要额外的 Forge 依赖), 把前者中非冗余的转换成 Forge 形式。
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.gradle.api.Named
org.gradle.api.Named.Namer -
Field Summary
FieldsFields inherited from interface org.gradle.api.Task
TASK_ACTION, TASK_CONSTRUCTOR_ARGS, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidgenerate()abstract org.gradle.api.file.RegularFileProperty输入:打完补丁的 client jar.abstract org.gradle.api.file.RegularFileProperty产物:合并后的 patched jar(与配置期同一条路径).abstract org.gradle.api.file.RegularFileProperty输入:打完补丁的 server jar.Methods inherited from class org.gradle.api.DefaultTask
compareTo, configure, dependsOn, doFirst, doFirst, doFirst, doLast, doLast, doLast, finalizedBy, getActions, getAnt, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getExtensions, getFinalizedBy, getGroup, getInputs, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getOutputs, getPath, getProject, getShouldRunAfter, getState, getTaskDependencies, getTemporaryDir, getTimeout, hasProperty, mustRunAfter, onlyIf, onlyIf, onlyIf, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setMustRunAfter, setOnlyIf, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, usesServiceMethods inherited from class org.gradle.api.internal.AbstractTask
acceptServiceReferences, appendParallelSafeAction, doNotTrackState, doNotTrackStateIf, getAsDynamicObject, getIdentityPath, getImpliesSubProjects, getLifecycleDependencies, getOnlyIf, getReasonNotToTrackState, getReasonsNotToTrackState, getReasonTaskIsIncompatibleWithConfigurationCache, getRequiredServices, getServices, getSharedResources, getStandardOutputCapture, getTaskActions, getTaskIdentity, getTemporaryDirFactory, hasTaskActions, injectIntoNewInstance, isCompatibleWithConfigurationCache, isEnabled, isHasCustomActions, notCompatibleWithConfigurationCache, prependParallelSafeAction, restoreOnlyIf, restoreTaskActions, setImpliesSubProjectsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.gradle.api.Task
doNotTrackState, notCompatibleWithConfigurationCache
-
Field Details
-
NAME
任务名:消费侧(本仓库的测试与诊断)按它引用产出任务.- See Also:
-
-
Constructor Details
-
MergeLegacyPatchedJarTask
public MergeLegacyPatchedJarTask()
-
-
Method Details
-
getClientPatchedJar
@InputFile @PathSensitive(NONE) public abstract org.gradle.api.file.RegularFileProperty getClientPatchedJar()输入:打完补丁的 client jar. -
getServerPatchedJar
@InputFile @PathSensitive(NONE) public abstract org.gradle.api.file.RegularFileProperty getServerPatchedJar()输入:打完补丁的 server jar. -
getOutputJar
@OutputFile public abstract org.gradle.api.file.RegularFileProperty getOutputJar()产物:合并后的 patched jar(与配置期同一条路径). -
generate
- Throws:
Exception
-