use of org.gradle.language.assembler.internal.DefaultAssembleSpec in project gradle by gradle.
the class Assemble method assemble.
@TaskAction
public void assemble() {
BuildOperationLogger operationLogger = getOperationLoggerFactory().newOperationLogger(getName(), getTemporaryDir());
boolean cleanedOutputs = StaleOutputCleaner.cleanOutputs(getDeleter(), getOutputs().getPreviousOutputFiles(), getObjectFileDir());
DefaultAssembleSpec spec = new DefaultAssembleSpec();
spec.setTempDir(getTemporaryDir());
spec.setObjectFileDir(getObjectFileDir());
spec.source(getSource());
spec.include(getIncludes());
spec.args(getAssemblerArgs());
spec.setOperationLogger(operationLogger);
NativeToolChainInternal nativeToolChain = (NativeToolChainInternal) toolChain.get();
NativePlatformInternal nativePlatform = (NativePlatformInternal) targetPlatform.get();
Compiler<AssembleSpec> compiler = nativeToolChain.select(nativePlatform).newCompiler(AssembleSpec.class);
WorkResult result = BuildOperationLoggingCompilerDecorator.wrap(compiler).execute(spec);
setDidWork(result.getDidWork() || cleanedOutputs);
}
Aggregations