Search in sources :

Example 6 with DaemonParameters

use of org.gradle.launcher.daemon.configuration.DaemonParameters in project gradle by gradle.

the class ConnectionScopeServices method createShutdownCoordinator.

ShutdownCoordinator createShutdownCoordinator(ListenerManager listenerManager, DaemonClientFactory daemonClientFactory, OutputEventListener outputEventListener) {
    ServiceRegistry clientServices = daemonClientFactory.createStopDaemonServices(outputEventListener, new DaemonParameters(new BuildLayoutParameters()));
    DaemonStopClient client = clientServices.get(DaemonStopClient.class);
    ShutdownCoordinator shutdownCoordinator = new ShutdownCoordinator(client);
    listenerManager.addListener(shutdownCoordinator);
    return shutdownCoordinator;
}
Also used : LoggingServiceRegistry(org.gradle.internal.logging.services.LoggingServiceRegistry) ServiceRegistry(org.gradle.internal.service.ServiceRegistry) BuildLayoutParameters(org.gradle.initialization.BuildLayoutParameters) DaemonParameters(org.gradle.launcher.daemon.configuration.DaemonParameters) DaemonStopClient(org.gradle.launcher.daemon.client.DaemonStopClient)

Example 7 with DaemonParameters

use of org.gradle.launcher.daemon.configuration.DaemonParameters in project gradle by gradle.

the class ParametersConverter method convert.

public Parameters convert(ParsedCommandLine args, @Nullable File currentDir) throws CommandLineArgumentException {
    InitialProperties initialProperties = initialPropertiesConverter.convert(args);
    BuildLayoutResult buildLayout = buildLayoutConverter.convert(initialProperties, args, currentDir);
    AllProperties properties = layoutToPropertiesConverter.convert(initialProperties, buildLayout);
    StartParameterInternal startParameter = new StartParameterInternal();
    startParameterConverter.convert(args, buildLayout, properties, startParameter);
    DaemonParameters daemonParameters = new DaemonParameters(buildLayout, fileCollectionFactory, properties.getRequestedSystemProperties());
    daemonParametersConverter.convert(args, properties, daemonParameters);
    return new Parameters(buildLayout, startParameter, daemonParameters);
}
Also used : DaemonParameters(org.gradle.launcher.daemon.configuration.DaemonParameters) InitialProperties(org.gradle.launcher.configuration.InitialProperties) AllProperties(org.gradle.launcher.configuration.AllProperties) StartParameterInternal(org.gradle.api.internal.StartParameterInternal) BuildLayoutResult(org.gradle.launcher.configuration.BuildLayoutResult) DaemonParameters(org.gradle.launcher.daemon.configuration.DaemonParameters)

Example 8 with DaemonParameters

use of org.gradle.launcher.daemon.configuration.DaemonParameters in project gradle by gradle.

the class DaemonBuildActionExecuter method execute.

@Override
public BuildActionResult execute(BuildAction action, ConnectionOperationParameters parameters, BuildRequestContext buildRequestContext) {
    ProviderOperationParameters operationParameters = parameters.getOperationParameters();
    ClassPath classPath = DefaultClassPath.of(operationParameters.getInjectedPluginClasspath());
    DaemonParameters daemonParameters = parameters.getDaemonParameters();
    BuildActionParameters actionParameters = new DefaultBuildActionParameters(daemonParameters.getEffectiveSystemProperties(), daemonParameters.getEnvironmentVariables(), SystemProperties.getInstance().getCurrentDir(), operationParameters.getBuildLogLevel(), daemonParameters.isEnabled(), classPath);
    return executer.execute(action, actionParameters, buildRequestContext);
}
Also used : DefaultClassPath(org.gradle.internal.classpath.DefaultClassPath) ClassPath(org.gradle.internal.classpath.ClassPath) DefaultBuildActionParameters(org.gradle.launcher.exec.DefaultBuildActionParameters) ProviderOperationParameters(org.gradle.tooling.internal.provider.connection.ProviderOperationParameters) DefaultBuildActionParameters(org.gradle.launcher.exec.DefaultBuildActionParameters) BuildActionParameters(org.gradle.launcher.exec.BuildActionParameters) DaemonParameters(org.gradle.launcher.daemon.configuration.DaemonParameters)

Aggregations

DaemonParameters (org.gradle.launcher.daemon.configuration.DaemonParameters)8 ServiceRegistry (org.gradle.internal.service.ServiceRegistry)3 DaemonStopClient (org.gradle.launcher.daemon.client.DaemonStopClient)3 BuildActionParameters (org.gradle.launcher.exec.BuildActionParameters)3 BuildLayoutParameters (org.gradle.initialization.BuildLayoutParameters)2 BuildLayoutConverter (org.gradle.launcher.cli.converter.BuildLayoutConverter)2 AllProperties (org.gradle.launcher.configuration.AllProperties)2 BuildLayoutResult (org.gradle.launcher.configuration.BuildLayoutResult)2 InitialProperties (org.gradle.launcher.configuration.InitialProperties)2 DefaultBuildActionParameters (org.gradle.launcher.exec.DefaultBuildActionParameters)2 ProviderOperationParameters (org.gradle.tooling.internal.provider.connection.ProviderOperationParameters)2 File (java.io.File)1 HashMap (java.util.HashMap)1 StartParameterInternal (org.gradle.api.internal.StartParameterInternal)1 CommandLineParser (org.gradle.cli.CommandLineParser)1 ParsedCommandLine (org.gradle.cli.ParsedCommandLine)1 ClassPath (org.gradle.internal.classpath.ClassPath)1 DefaultClassPath (org.gradle.internal.classpath.DefaultClassPath)1 LoggingServiceRegistry (org.gradle.internal.logging.services.LoggingServiceRegistry)1 InitialPropertiesConverter (org.gradle.launcher.cli.converter.InitialPropertiesConverter)1