use of org.gradle.tooling.internal.provider.connection.ProviderBuildResult in project gradle by gradle.
the class DefaultConnection method getModel.
/**
* This is used by consumers 2.1-rc-1 and later
*/
public BuildResult<?> getModel(ModelIdentifier modelIdentifier, InternalCancellationToken cancellationToken, BuildParameters operationParameters) throws BuildExceptionVersion1, InternalUnsupportedModelException, InternalUnsupportedBuildArgumentException, IllegalStateException {
ProviderOperationParameters providerParameters = validateAndConvert(operationParameters);
BuildCancellationToken buildCancellationToken = new InternalCancellationTokenAdapter(cancellationToken);
Object result = connection.run(modelIdentifier.getName(), buildCancellationToken, providerParameters);
return new ProviderBuildResult<Object>(result);
}
use of org.gradle.tooling.internal.provider.connection.ProviderBuildResult in project gradle by gradle.
the class DefaultConnection method run.
/**
* This is used by consumers 1.8-rc-1 to 2.0
*/
public <T> BuildResult<T> run(InternalBuildAction<T> action, BuildParameters operationParameters) throws BuildExceptionVersion1, InternalUnsupportedBuildArgumentException, IllegalStateException {
ProviderOperationParameters providerParameters = validateAndConvert(operationParameters);
Object results = connection.run(action, new DefaultBuildCancellationToken(), providerParameters);
return new ProviderBuildResult<T>((T) results);
}
Aggregations