Interface StepLogic.ExecutionContext

Enclosing class:
StepLogic<O extends Service.Options>

public static interface StepLogic.ExecutionContext
  • Method Details

    • logger

      org.gradle.api.logging.Logger logger()
    • setOutput

      Path setOutput(String fileName) throws IOException
      Throws:
      IOException
    • setOutput

      Path setOutput(Path output)
    • cache

      Path cache() throws IOException
      Throws:
      IOException
    • mappings

      Path mappings()
      Mappings extracted from data.mappings in the MCPConfig JSON.
    • resolve

      String resolve(ConfigValue value)
    • downloadBuilder

      DownloadBuilder downloadBuilder(String url)
    • javaexec

      void javaexec(org.gradle.api.Action<? super ForgeToolExecutor.Settings> configurator)
    • ensureToolJar

      Path ensureToolJar(Path target, String url) throws IOException
      把工具 jar 就位(缺失才下载)并返回其路径.

      下载被刻意推迟到执行期:配置期对「下载缓存中的文件」做存在性判断会被配置缓存记成 文件系统输入指纹,而该文件在任务结束时被清掉,下一次构建的存在性就与记录值相反—— 于是配置缓存永远无法复用。执行期(任务动作内)的文件系统观察不会被记录,因此不会污染指纹。

      Parameters:
      target - 配置期纯计算出的落位路径
      url - 下载地址
      Throws:
      IOException
    • resolve

      default List<String> resolve(List<ConfigValue> configValues)