Class TaskStepLoader

java.lang.Object
wtf.ranked.hytale.server.runner.step.TaskStepLoader

@NullMarked public final class TaskStepLoader extends Object
Orchestrator that transforms a sequence of TaskStep classes into a linked Gradle task chain.

This loader implements a sequential execution pipeline by configuring task dependencies. It ensures that build prerequisites are satisfied before step execution, and that individual steps are run in the precise order defined by the GlobalRunningTask.

  • Constructor Details

    • TaskStepLoader

      public TaskStepLoader()
  • Method Details

    • setup

      public void setup(GlobalRunningTask runningTask)
      Configures the task dependencies for a given GlobalRunningTask to create a sequential execution pipeline.

      The method first collects prerequisite build tasks from the HytalePluginExtension and maps TaskStep classes into TaskProvider instances. These are combined into a single flat list.

      Using a reduction algorithm, the method links these tasks sequentially: each task is configured to depend on the one immediately preceding it in the list via current.dependsOn(previous). Finally, the GlobalRunningTask itself is configured to depend on the last task in this chain.

      Parameters:
      runningTask - the global task orchestrating the lifecycle