Interface ForgeSourcesService.Options

All Superinterfaces:
Service.Options
Enclosing class:
ForgeSourcesService

public static interface ForgeSourcesService.Options extends Service.Options
  • Method Details

    • getForgeSourceJars

      @Optional @InputFiles @PathSensitive(NONE) org.gradle.api.file.ConfigurableFileCollection getForgeSourceJars()
      Forge 安装器源码包(归档形态).

      由 ForgeSourcesService.createOptions(Project) 无条件声明,因此始终参与任务输入哈希, 并不是「只有未接入声明式解压时才存在」的可选项。归档只在两种情况下真正被解压: 没有可用的 getForgeSourceDirectories(),或调用方明确要求走归档路径 (例如配置期,见 ForgeSourcesService.addForgeSourcesDuringProjectConfiguration(Project, ServiceFactory))。

    • getForgeSourceDirectories

      @Optional @InputFiles @PathSensitive(RELATIVE) org.gradle.api.file.ConfigurableFileCollection getForgeSourceDirectories()
      由声明式解压任务(extractForgeSources)预先展开的 Forge 源码目录.

      这里只是按构建目录约定声明出来的路径,不含 getBuiltBy() 一类构建依赖: 任务依赖由 genSources / genForgePatchedSources 自己声明, 所以配置期调用方不能消费它(那时的目录只可能来自上一次构建),必须改走归档路径。 使用 PathSensitivity.RELATIVE 以「目录内容」语义参与输入哈希, 避免缓存目录绝对路径变化引起无谓重跑。

    • getSourceRemapperService

      @Optional org.gradle.api.provider.Property<SourceRemapperService.Options> getSourceRemapperService()
    • getShouldShowVerboseStderr

      @Internal org.gradle.api.provider.Property<Boolean> getShouldShowVerboseStderr()
      是否把工具的标准错误透传到构建日志.

      标记为 @Internal 而**不是** @Input:它只决定错误流接哪里, 不参与任何产物字节;而取值随构建日志级别与 stacktrace 开关变化 (ForgeToolExecutor#shouldShowVerboseStderr),当 @Input 会让 「换日志级别」等于换缓存键,使引用本服务选项的任务永远无法命中缓存。 同上理由的还有 ForgeToolExecutor.Settings 与 AccessTransformForgeJarTask 里的对应字段。