use of org.gradle.launcher.exec.DefaultBuildActionParameters in project gradle by gradle.
the class DaemonBuildActionExecuter method execute.
public Object execute(BuildAction action, BuildRequestContext buildRequestContext, ProviderOperationParameters parameters, ServiceRegistry contextServices) {
boolean continuous = action.getStartParameter() != null && action.getStartParameter().isContinuous() && isNotBuildingModel(action);
if (continuous && !doesConsumerSupportCancellation(buildRequestContext)) {
throw new UnsupportedVersionException("Continuous build requires Tooling API client version 2.1 or later.");
}
ClassPath classPath = DefaultClassPath.of(parameters.getInjectedPluginClasspath(Collections.<File>emptyList()));
BuildActionParameters actionParameters = new DefaultBuildActionParameters(daemonParameters.getEffectiveSystemProperties(), daemonParameters.getEnvironmentVariables(), SystemProperties.getInstance().getCurrentDir(), parameters.getBuildLogLevel(), daemonParameters.isEnabled(), continuous, false, classPath);
try {
return executer.execute(action, buildRequestContext, actionParameters, contextServices);
} catch (ReportedException e) {
Throwable t = e.getCause();
while (t != null) {
if (t instanceof BuildCancelledException) {
throw new InternalBuildCancelledException(e.getCause());
}
t = t.getCause();
}
throw new BuildExceptionVersion1(e.getCause());
}
}
Aggregations