use of org.gradle.internal.operations.BuildOperationQueue in project gradle by gradle.
the class ArStaticLibraryArchiver method execute.
@Override
public WorkResult execute(final StaticLibraryArchiverSpec spec) {
deletePreviousOutput(spec);
List<String> args = argsTransformer.transform(spec);
invocationContext.getArgAction().execute(args);
final CommandLineToolInvocation invocation = invocationContext.createInvocation("archiving " + spec.getOutputFile().getName(), args, spec.getOperationLogger());
buildOperationProcessor.run(commandLineToolInvocationWorker, new Action<BuildOperationQueue<CommandLineToolInvocation>>() {
@Override
public void execute(BuildOperationQueue<CommandLineToolInvocation> buildQueue) {
buildQueue.setLogLocation(spec.getOperationLogger().getLogLocation());
buildQueue.add(invocation);
}
});
return new SimpleWorkResult(true);
}
use of org.gradle.internal.operations.BuildOperationQueue in project gradle by gradle.
the class LinkExeLinker method execute.
@Override
public WorkResult execute(final LinkerSpec spec) {
LinkerSpec transformedSpec = specTransformer.transform(spec);
List<String> args = argsTransformer.transform(transformedSpec);
invocationContext.getArgAction().execute(args);
new VisualCppOptionsFileArgsWriter(spec.getTempDir()).execute(args);
final CommandLineToolInvocation invocation = invocationContext.createInvocation("linking " + spec.getOutputFile().getName(), args, spec.getOperationLogger());
buildOperationProcessor.run(commandLineToolInvocationWorker, new Action<BuildOperationQueue<CommandLineToolInvocation>>() {
@Override
public void execute(BuildOperationQueue<CommandLineToolInvocation> buildQueue) {
buildQueue.setLogLocation(spec.getOperationLogger().getLogLocation());
buildQueue.add(invocation);
}
});
return new SimpleWorkResult(true);
}
use of org.gradle.internal.operations.BuildOperationQueue in project gradle by gradle.
the class GccLinker method execute.
@Override
public WorkResult execute(final LinkerSpec spec) {
List<String> args = argsTransformer.transform(spec);
invocationContext.getArgAction().execute(args);
if (useCommandFile) {
new GccOptionsFileArgsWriter(spec.getTempDir()).execute(args);
}
final CommandLineToolInvocation invocation = invocationContext.createInvocation("linking " + spec.getOutputFile().getName(), args, spec.getOperationLogger());
buildOperationProcessor.run(commandLineToolInvocationWorker, new Action<BuildOperationQueue<CommandLineToolInvocation>>() {
@Override
public void execute(BuildOperationQueue<CommandLineToolInvocation> buildQueue) {
buildQueue.setLogLocation(spec.getOperationLogger().getLogLocation());
buildQueue.add(invocation);
}
});
return new SimpleWorkResult(true);
}
use of org.gradle.internal.operations.BuildOperationQueue in project gradle by gradle.
the class DefaultTestReport method generateFiles.
private void generateFiles(AllTestResults model, final TestResultsProvider resultsProvider, File reportDir) {
try {
HtmlReportRenderer htmlRenderer = new HtmlReportRenderer();
htmlRenderer.render(model, new ReportRenderer<AllTestResults, HtmlReportBuilder>() {
@Override
public void render(final AllTestResults model, final HtmlReportBuilder output) throws IOException {
buildOperationProcessor.run(new Action<BuildOperationQueue<HtmlReportFileGenerator<? extends CompositeTestResults>>>() {
@Override
public void execute(BuildOperationQueue<HtmlReportFileGenerator<? extends CompositeTestResults>> queue) {
queue.add(generator("index.html", model, new OverviewPageRenderer(), output));
for (PackageTestResults packageResults : model.getPackages()) {
queue.add(generator(packageResults.getBaseUrl(), packageResults, new PackagePageRenderer(), output));
for (ClassTestResults classResults : packageResults.getClasses()) {
queue.add(generator(classResults.getBaseUrl(), classResults, new ClassPageRenderer(resultsProvider), output));
}
}
}
});
}
}, reportDir);
} catch (Exception e) {
throw new GradleException(String.format("Could not generate test report to '%s'.", reportDir), e);
}
}
use of org.gradle.internal.operations.BuildOperationQueue in project gradle by gradle.
the class ArStaticLibraryArchiver method newInvocationAction.
@Override
protected Action<BuildOperationQueue<CommandLineToolInvocation>> newInvocationAction(final StaticLibraryArchiverSpec spec, List<String> args) {
final CommandLineToolInvocation invocation = newInvocation("archiving " + spec.getOutputFile().getName(), spec.getOutputFile().getParentFile(), args, spec.getOperationLogger());
return new Action<BuildOperationQueue<CommandLineToolInvocation>>() {
@Override
public void execute(BuildOperationQueue<CommandLineToolInvocation> buildQueue) {
buildQueue.setLogLocation(spec.getOperationLogger().getLogLocation());
buildQueue.add(invocation);
}
};
}
Aggregations