Interface FunctionLogic.Options

All Superinterfaces:
Service.Options
Enclosing class:
FunctionLogic

public static interface FunctionLogic.Options extends Service.Options
  • Method Summary

    Modifier and Type
    Method
    Description
    org.gradle.api.provider.Property<McpConfigFunction>
     
    org.gradle.api.file.ConfigurableFileCollection
    工具 jar 本身,作为输入参与 up-to-date 判定.
    org.gradle.api.file.RegularFileProperty
    工具 jar 的落位路径.

    Methods inherited from interface net.fabricmc.loom.util.service.Service.Options

    getServiceClass
  • Method Details

    • getFunction

      @Input org.gradle.api.provider.Property<McpConfigFunction> getFunction()
    • getToolJarPath

      @Internal org.gradle.api.file.RegularFileProperty getToolJarPath()
      工具 jar 的落位路径.

      @Internal:它只是「下载缓存里按 URL 算出来的地址」,配置期纯计算即可得, 本身不是可判定的输入;参与 up-to-date 判定的是 getToolJar()。

    • getToolJar

      @InputFiles @PathSensitive(NONE) org.gradle.api.file.ConfigurableFileCollection getToolJar()
      工具 jar 本身,作为输入参与 up-to-date 判定.

      用 @InputFiles(而不是 @InputFile):该文件在配置期刻意不下载 (见 FunctionLogic.createOptions(dev.architectury.loom.mcpconfig.steplogic.StepLogic.SetupContext, dev.architectury.loom.mcpconfig.McpConfigFunction)),因此配置期它可能并不存在,而 @InputFile 对 「已设值但文件不存在」会直接判任务失败(@Optional 也不能豁免)。@InputFiles 允许缺失,存在时按内容参与判定。工具的「身份」另由 getFunction() 里的 repo/version 覆盖——版本或仓库一变即失效。