/**
  * This method was used by consumers 1.0-rc-1 through to 1.1. Later consumers use {@link
  * #configure(org.gradle.tooling.internal.protocol.ConnectionParameters)} instead.
  */
 public void configureLogging(final boolean verboseLogging) {
   ProviderConnectionParameters providerConnectionParameters =
       adapter.adapt(
           ProviderConnectionParameters.class,
           new VerboseLoggingOnlyConnectionParameters(verboseLogging));
   connection.configure(providerConnectionParameters);
 }
 /** This is used by consumers 1.8-rc-1 and later. */
 public <T> BuildResult<T> run(InternalBuildAction<T> action, BuildParameters operationParameters)
     throws BuildExceptionVersion1, InternalUnsupportedBuildArgumentException,
         IllegalStateException {
   validateCanRun();
   ProviderOperationParameters providerParameters = toProviderParameters(operationParameters);
   Object results = connection.run(action, new FixedBuildCancellationToken(), providerParameters);
   return new ProviderBuildResult<T>((T) results);
 }
 private <T> T run(Class<T> type, BuildOperationParametersVersion1 parameters) {
   String modelName = new ModelMapping().getModelNameFromProtocolType(type);
   return (T)
       connection.run(
           modelName,
           new FixedBuildCancellationToken(),
           new AdaptedOperationParameters(parameters));
 }
 /** This is used by consumers 1.8-rc-1 and later. */
 public <T> BuildResult<T> run(ClientBuildAction<T> action, BuildParameters operationParameters)
     throws BuildExceptionVersion1, InternalUnsupportedBuildArgumentException,
         IllegalStateException {
   logTargetVersion();
   ProviderOperationParameters providerParameters = toProviderParameters(operationParameters);
   Object results = connection.run(action, providerParameters);
   return new ProviderBuildResult<T>((T) results);
 }
 /** This is used by consumers 1.6-rc-1 and later */
 public BuildResult<?> getModel(
     ModelIdentifier modelIdentifier, BuildParameters operationParameters)
     throws UnsupportedOperationException, IllegalStateException {
   logTargetVersion();
   ProviderOperationParameters providerParameters = toProviderParameters(operationParameters);
   Object result = connection.run(modelIdentifier.getName(), providerParameters);
   return new ProviderBuildResult<Object>(result);
 }
 /** This is used by consumers 1.2-rc-1 to 1.5 */
 @Deprecated
 public <T> BuildResult<T> run(Class<T> type, BuildParameters buildParameters)
     throws UnsupportedOperationException, IllegalStateException {
   validateCanRun();
   ProviderOperationParameters providerParameters = toProviderParameters(buildParameters);
   String modelName = new ModelMapping().getModelNameFromProtocolType(type);
   T result = (T) connection.run(modelName, new FixedBuildCancellationToken(), providerParameters);
   return new ProviderBuildResult<T>(result);
 }
 /** This is used by consumers 1.0-milestone-3 to 1.1. */
 @Deprecated
 public void executeBuild(
     BuildParametersVersion1 buildParameters,
     BuildOperationParametersVersion1 operationParameters) {
   logTargetVersion();
   connection.run(
       ModelIdentifier.NULL_MODEL,
       new AdaptedOperationParameters(operationParameters, buildParameters.getTasks()));
 }
 /** This is used by consumers 1.6-rc-1 and later */
 public BuildResult<?> getModel(
     ModelIdentifier modelIdentifier, BuildParameters operationParameters)
     throws UnsupportedOperationException, IllegalStateException {
   validateCanRun();
   ProviderOperationParameters providerParameters = toProviderParameters(operationParameters);
   Object result =
       connection.run(
           modelIdentifier.getName(), new FixedBuildCancellationToken(), providerParameters);
   return new ProviderBuildResult<Object>(result);
 }
 /** 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 {
   validateCanRun();
   ProviderOperationParameters providerParameters = toProviderParameters(operationParameters);
   BuildCancellationToken buildCancellationToken =
       new BuildCancellationTokenAdapter(cancellationToken);
   Object result =
       connection.run(modelIdentifier.getName(), buildCancellationToken, providerParameters);
   return new ProviderBuildResult<Object>(result);
 }
Exemple #10
0
 /** This is used by consumers 1.2-rc-1 and later. */
 public void configure(ConnectionParameters parameters) {
   ProviderConnectionParameters providerConnectionParameters =
       adapter.adapt(ProviderConnectionParameters.class, parameters);
   connection.configure(providerConnectionParameters);
 }
 /** This is used by consumers 1.0-milestone-3 and later */
 public void stop() {
   connection.stop();
 }