Search in sources :

Example 6 with CommandLineToolInvocation

use of org.gradle.nativeplatform.toolchain.internal.CommandLineToolInvocation 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);
        }
    };
}
Also used : Action(org.gradle.api.Action) CommandLineToolInvocation(org.gradle.nativeplatform.toolchain.internal.CommandLineToolInvocation) BuildOperationQueue(org.gradle.internal.operations.BuildOperationQueue)

Example 7 with CommandLineToolInvocation

use of org.gradle.nativeplatform.toolchain.internal.CommandLineToolInvocation 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);
}
Also used : StaticLibraryArchiverSpec(org.gradle.nativeplatform.internal.StaticLibraryArchiverSpec) CommandLineToolInvocation(org.gradle.nativeplatform.toolchain.internal.CommandLineToolInvocation) BuildOperationQueue(org.gradle.internal.operations.BuildOperationQueue) SimpleWorkResult(org.gradle.api.internal.tasks.SimpleWorkResult)

Example 8 with CommandLineToolInvocation

use of org.gradle.nativeplatform.toolchain.internal.CommandLineToolInvocation in project gradle by gradle.

the class GccLinker method newInvocationAction.

@Override
protected Action<BuildOperationQueue<CommandLineToolInvocation>> newInvocationAction(final LinkerSpec spec, List<String> args) {
    final CommandLineToolInvocation invocation = newInvocation("linking " + spec.getOutputFile().getName(), args, spec.getOperationLogger());
    return new Action<BuildOperationQueue<CommandLineToolInvocation>>() {

        @Override
        public void execute(BuildOperationQueue<CommandLineToolInvocation> buildQueue) {
            buildQueue.setLogLocation(spec.getOperationLogger().getLogLocation());
            buildQueue.add(invocation);
        }
    };
}
Also used : Action(org.gradle.api.Action) CommandLineToolInvocation(org.gradle.nativeplatform.toolchain.internal.CommandLineToolInvocation) BuildOperationQueue(org.gradle.internal.operations.BuildOperationQueue)

Example 9 with CommandLineToolInvocation

use of org.gradle.nativeplatform.toolchain.internal.CommandLineToolInvocation in project gradle by gradle.

the class SwiftLinker method newInvocationAction.

@Override
protected Action<BuildOperationQueue<CommandLineToolInvocation>> newInvocationAction(final LinkerSpec spec, List<String> args) {
    final CommandLineToolInvocation invocation = newInvocation("linking " + 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);
        }
    };
}
Also used : Action(org.gradle.api.Action) CommandLineToolInvocation(org.gradle.nativeplatform.toolchain.internal.CommandLineToolInvocation) BuildOperationQueue(org.gradle.internal.operations.BuildOperationQueue)

Aggregations

BuildOperationQueue (org.gradle.internal.operations.BuildOperationQueue)9 CommandLineToolInvocation (org.gradle.nativeplatform.toolchain.internal.CommandLineToolInvocation)9 Action (org.gradle.api.Action)6 SimpleWorkResult (org.gradle.api.internal.tasks.SimpleWorkResult)3 File (java.io.File)1 Transformer (org.gradle.api.Transformer)1 StaticLibraryArchiverSpec (org.gradle.nativeplatform.internal.StaticLibraryArchiverSpec)1 ArgsTransformer (org.gradle.nativeplatform.toolchain.internal.ArgsTransformer)1