use of org.gradle.nativeplatform.internal.StaticLibraryArchiverSpec in project gradle by gradle.
the class LibExeStaticLibraryArchiver method execute.
@Override
public WorkResult execute(final StaticLibraryArchiverSpec spec) {
final StaticLibraryArchiverSpec transformedSpec = specTransformer.transform(spec);
final List<String> args = argsTransformer.transform(transformedSpec);
invocationContext.getArgAction().execute(args);
new VisualCppOptionsFileArgsWriter(spec.getTempDir()).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.nativeplatform.internal.StaticLibraryArchiverSpec in project gradle by gradle.
the class CreateStaticLibrary method link.
@TaskAction
public void link() {
StaticLibraryArchiverSpec spec = new DefaultStaticLibraryArchiverSpec();
spec.setTempDir(getTemporaryDir());
spec.setOutputFile(getOutputFile());
spec.objectFiles(getSource());
spec.args(getStaticLibArgs());
BuildOperationLogger operationLogger = getOperationLoggerFactory().newOperationLogger(getName(), getTemporaryDir());
spec.setOperationLogger(operationLogger);
Compiler<StaticLibraryArchiverSpec> compiler = Cast.uncheckedCast(toolChain.select(targetPlatform).newCompiler(spec.getClass()));
WorkResult result = BuildOperationLoggingCompilerDecorator.wrap(compiler).execute(spec);
setDidWork(result.getDidWork());
}
Aggregations