Class GradleServiceRegistrar

java.lang.Object
wtf.ranked.hytale.server.runner.registrar.GradleServiceRegistrar
All Implemented Interfaces:
Registrar<org.gradle.api.services.BuildService<HytaleExtensionParameters>>

@NullMarked public final class GradleServiceRegistrar extends Object implements Registrar<org.gradle.api.services.BuildService<HytaleExtensionParameters>>
Registrar responsible for configuring and providing Gradle Shared Build Services.

Shared services are used to manage global state or heavy resources across parallel tasks. This registrar ensures that any registered service is automatically injected with the current HytalePluginExtension configuration.

  • Constructor Details

    • GradleServiceRegistrar

      public GradleServiceRegistrar(org.gradle.api.Project project)
  • Method Details

    • register

      public void register(String identifier, Class<? extends org.gradle.api.services.BuildService<HytaleExtensionParameters>> value)
      Registers a build service if it is not already present in the registry.

      The service is configured with a Action that wires the project's Hytale boot extension into the service's parameters.

      Specified by:
      register in interface Registrar<org.gradle.api.services.BuildService<HytaleExtensionParameters>>
      Parameters:
      identifier - the unique name for the shared service
      value - the class implementation of the build service