use of org.gradle.api.tasks.WorkResult in project gradle by gradle.
the class IncrementalResultStoringDecorator method execute.
@Override
public WorkResult execute(JavaCompileSpec spec) {
WorkResult out = delegate.execute(spec);
updater.updateAnalysis(spec, out);
writer.storeJarSnapshots(spec.getCompileClasspath());
annotationProcessorPathStore.put(spec.getAnnotationProcessorPath());
return out;
}
use of org.gradle.api.tasks.WorkResult in project gradle by gradle.
the class WindowsResourceCompile method compile.
@TaskAction
public void compile(IncrementalTaskInputs inputs) {
BuildOperationLogger operationLogger = getOperationLoggerFactory().newOperationLogger(getName(), getTemporaryDir());
NativeCompileSpec spec = new DefaultWindowsResourceCompileSpec();
spec.setTempDir(getTemporaryDir());
spec.setObjectFileDir(getOutputDir());
spec.include(getIncludes());
spec.source(getSource());
spec.setMacros(getMacros());
spec.args(getCompilerArgs());
spec.setIncrementalCompile(inputs.isIncremental());
spec.setOperationLogger(operationLogger);
NativeToolChainInternal nativeToolChain = (NativeToolChainInternal) toolChain.get();
NativePlatformInternal nativePlatform = (NativePlatformInternal) targetPlatform.get();
PlatformToolProvider platformToolProvider = nativeToolChain.select(nativePlatform);
WorkResult result = doCompile(spec, platformToolProvider);
setDidWork(result.getDidWork());
}
use of org.gradle.api.tasks.WorkResult in project gradle by gradle.
the class SyncCopyActionDecorator method execute.
@Override
public WorkResult execute(final CopyActionProcessingStream stream) {
final Set<RelativePath> visited = new HashSet<>();
WorkResult didWork = delegate.execute(action -> stream.process(details -> {
visited.add(details.getRelativePath());
action.processFile(details);
}));
SyncCopyActionDecoratorFileVisitor fileVisitor = new SyncCopyActionDecoratorFileVisitor(visited, preserveSpec, deleter);
MinimalFileTree walker = directoryFileTreeFactory.create(baseDestDir).postfix();
walker.visit(fileVisitor);
visited.clear();
return WorkResults.didWork(didWork.getDidWork() || fileVisitor.didWork);
}
use of org.gradle.api.tasks.WorkResult in project gradle by gradle.
the class WindowsResourceCompile method compile.
@TaskAction
public void compile(InputChanges inputs) {
BuildOperationLogger operationLogger = getOperationLoggerFactory().newOperationLogger(getName(), getTemporaryDir());
NativeCompileSpec spec = new DefaultWindowsResourceCompileSpec();
spec.setTempDir(getTemporaryDir());
spec.setObjectFileDir(getOutputDir());
spec.include(getIncludes());
spec.source(getSource());
spec.setMacros(getMacros());
spec.args(getCompilerArgs().get());
spec.setIncrementalCompile(inputs.isIncremental());
spec.setOperationLogger(operationLogger);
NativeToolChainInternal nativeToolChain = (NativeToolChainInternal) toolChain.get();
NativePlatformInternal nativePlatform = (NativePlatformInternal) targetPlatform.get();
PlatformToolProvider platformToolProvider = nativeToolChain.select(nativePlatform);
WorkResult result = doCompile(spec, platformToolProvider);
setDidWork(result.getDidWork());
}
use of org.gradle.api.tasks.WorkResult in project gradle by gradle.
the class IncrementalNativeCompiler method doCleanIncrementalCompile.
protected WorkResult doCleanIncrementalCompile(T spec) {
boolean deleted = cleanPreviousOutputs(spec);
spec.setSourceFilesForPch(getSourceFilesForPch(spec));
WorkResult compileResult = delegateCompiler.execute(spec);
if (deleted && !compileResult.getDidWork()) {
return WorkResults.didWork(true);
}
return compileResult;
}
Aggregations