Search in sources :

Example 6 with BuildLayoutParameters

use of org.gradle.initialization.BuildLayoutParameters 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 BuildLayoutParameters

use of org.gradle.initialization.BuildLayoutParameters in project gradle by gradle.

the class DefaultConnection method configure.

/**
 * This is used by consumers 1.2-rc-1 and later.
 */
public void configure(ConnectionParameters parameters) {
    assertUsingJava7();
    ProviderConnectionParameters providerConnectionParameters = new ProtocolToModelAdapter().adapt(ProviderConnectionParameters.class, parameters);
    File gradleUserHomeDir = providerConnectionParameters.getGradleUserHomeDir(null);
    if (gradleUserHomeDir == null) {
        gradleUserHomeDir = new BuildLayoutParameters().getGradleUserHomeDir();
    }
    initializeServices(gradleUserHomeDir);
    connection.configure(providerConnectionParameters);
    consumerVersion = GradleVersion.version(providerConnectionParameters.getConsumerVersion());
}
Also used : ProtocolToModelAdapter(org.gradle.tooling.internal.adapter.ProtocolToModelAdapter) ProviderConnectionParameters(org.gradle.tooling.internal.provider.connection.ProviderConnectionParameters) BuildLayoutParameters(org.gradle.initialization.BuildLayoutParameters) File(java.io.File)

Aggregations

BuildLayoutParameters (org.gradle.initialization.BuildLayoutParameters)7 File (java.io.File)5 DaemonParameters (org.gradle.launcher.daemon.configuration.DaemonParameters)3 ServiceRegistry (org.gradle.internal.service.ServiceRegistry)2 DaemonStopClient (org.gradle.launcher.daemon.client.DaemonStopClient)2 ProviderConnectionParameters (org.gradle.tooling.internal.provider.connection.ProviderConnectionParameters)2 SmartList (com.intellij.util.SmartList)1 HashMap (java.util.HashMap)1 LoggingServiceRegistry (org.gradle.internal.logging.services.LoggingServiceRegistry)1 LayoutToPropertiesConverter (org.gradle.launcher.cli.converter.LayoutToPropertiesConverter)1 PropertiesToDaemonParametersConverter (org.gradle.launcher.cli.converter.PropertiesToDaemonParametersConverter)1 BuildActionParameters (org.gradle.launcher.exec.BuildActionParameters)1 JvmOptions (org.gradle.process.internal.JvmOptions)1 ProtocolToModelAdapter (org.gradle.tooling.internal.adapter.ProtocolToModelAdapter)1 ProviderOperationParameters (org.gradle.tooling.internal.provider.connection.ProviderOperationParameters)1 UnsupportedMethodException (org.gradle.tooling.model.UnsupportedMethodException)1 GradleProjectSettings (org.jetbrains.plugins.gradle.settings.GradleProjectSettings)1