Example #1
0
 /** 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);
 }
Example #2
0
 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);
 }
Example #5
0
 /** 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()));
 }
Example #7
0
 /** 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);
 }
Example #8
0
 /** 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);
 }