Search in sources :

Example 1 with ProviderConnectionParameters

use of org.gradle.tooling.internal.provider.connection.ProviderConnectionParameters 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) {
    UnsupportedJavaRuntimeException.assertUsingVersion("Gradle", JavaVersion.VERSION_1_7);
    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());
    supportedConsumerVersion = consumerVersion.compareTo(MIN_CLIENT_VERSION) >= 0;
}
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

File (java.io.File)1 BuildLayoutParameters (org.gradle.initialization.BuildLayoutParameters)1 ProtocolToModelAdapter (org.gradle.tooling.internal.adapter.ProtocolToModelAdapter)1 ProviderConnectionParameters (org.gradle.tooling.internal.provider.connection.ProviderConnectionParameters)1