Class GradleServiceRegistrar
java.lang.Object
wtf.ranked.hytale.server.runner.registrar.GradleServiceRegistrar
- All Implemented Interfaces:
Registrar<org.gradle.api.services.BuildService<HytaleExtensionParameters>>
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidregister(@NonNull String identifier, @NonNull Class<? extends org.gradle.api.services.BuildService<HytaleExtensionParameters>> buildService) Registers a build service if it is not already present in the registry.
-
Constructor Details
-
GradleServiceRegistrar
public GradleServiceRegistrar(@NonNull org.gradle.api.Project project)
-
-
Method Details
-
register
public void register(@NonNull String identifier, @NonNull Class<? extends org.gradle.api.services.BuildService<HytaleExtensionParameters>> buildService) Registers a build service if it is not already present in the registry.The service is configured with a
Actionthat wires the project's Hytale boot extension into the service's parameters.- Specified by:
registerin interfaceRegistrar<org.gradle.api.services.BuildService<HytaleExtensionParameters>>- Parameters:
identifier- the unique name for the shared servicebuildService- the class implementation of the build service
-