public interface BuildServiceRegistry
A registry is available using Gradle.getSharedServices()
.
Modifier and Type | Method | Description |
---|---|---|
NamedDomainObjectSet<BuildServiceRegistration<?,?>> |
getRegistrations() |
Returns the set of service registrations.
|
<T extends BuildService<P>,P extends BuildServiceParameters> |
registerIfAbsent(java.lang.String name,
java.lang.Class<T> implementationType,
Action<? super BuildServiceSpec<P>> configureAction) |
Registers a service, if a service with the given name is not already registered.
|
NamedDomainObjectSet<BuildServiceRegistration<?,?>> getRegistrations()
<T extends BuildService<P>,P extends BuildServiceParameters> Provider<T> registerIfAbsent(java.lang.String name, java.lang.Class<T> implementationType, Action<? super BuildServiceSpec<P>> configureAction)
Provider
is queried.name
- A name to use to identify the service.implementationType
- The service implementation type. Instances of the service are created as for ObjectFactory.newInstance(Class, Object...)
.configureAction
- An action to configure the registration. You can use this to provide parameters to the service instance.Provider
that will create the service instance when queried.