use of org.gradle.language.base.internal.tasks.SimpleStaleClassCleaner in project gradle by gradle.
the class CleaningPlayToolCompiler method execute.
@Override
public WorkResult execute(T spec) {
SimpleStaleClassCleaner cleaner = new SimpleStaleClassCleaner(taskOutputs);
cleaner.setDestinationDir(spec.getDestinationDir());
cleaner.execute();
return delegate.execute(spec);
}
use of org.gradle.language.base.internal.tasks.SimpleStaleClassCleaner in project gradle by gradle.
the class AbstractLinkTask method link.
@TaskAction
public void link() {
SimpleStaleClassCleaner cleaner = new SimpleStaleClassCleaner(getOutputs());
cleaner.setDestinationDir(getDestinationDir());
cleaner.execute();
if (getSource().isEmpty()) {
setDidWork(false);
return;
}
LinkerSpec spec = createLinkerSpec();
spec.setTargetPlatform(getTargetPlatform());
spec.setTempDir(getTemporaryDir());
spec.setOutputFile(getOutputFile());
spec.objectFiles(getSource());
spec.libraries(getLibs());
spec.args(getLinkerArgs());
BuildOperationLogger operationLogger = getOperationLoggerFactory().newOperationLogger(getName(), getTemporaryDir());
spec.setOperationLogger(operationLogger);
Compiler<LinkerSpec> compiler = Cast.uncheckedCast(toolChain.select(targetPlatform).newCompiler(spec.getClass()));
compiler = BuildOperationLoggingCompilerDecorator.wrap(compiler);
WorkResult result = compiler.execute(spec);
setDidWork(result.getDidWork());
}
use of org.gradle.language.base.internal.tasks.SimpleStaleClassCleaner in project gradle by gradle.
the class IncrementalNativeCompiler method cleanPreviousOutputs.
private boolean cleanPreviousOutputs(NativeCompileSpec spec) {
SimpleStaleClassCleaner cleaner = new SimpleStaleClassCleaner(getTask().getOutputs());
cleaner.setDestinationDir(spec.getObjectFileDir());
cleaner.execute();
return cleaner.getDidWork();
}
use of org.gradle.language.base.internal.tasks.SimpleStaleClassCleaner in project gradle by gradle.
the class Assemble method assemble.
@TaskAction
public void assemble() {
BuildOperationLogger operationLogger = getOperationLoggerFactory().newOperationLogger(getName(), getTemporaryDir());
SimpleStaleClassCleaner cleaner = new SimpleStaleClassCleaner(getOutputs());
cleaner.setDestinationDir(getObjectFileDir());
cleaner.execute();
DefaultAssembleSpec spec = new DefaultAssembleSpec();
spec.setTempDir(getTemporaryDir());
spec.setObjectFileDir(getObjectFileDir());
spec.source(getSource());
spec.args(getAssemblerArgs());
spec.setOperationLogger(operationLogger);
Compiler<AssembleSpec> compiler = toolChain.select(targetPlatform).newCompiler(AssembleSpec.class);
WorkResult result = BuildOperationLoggingCompilerDecorator.wrap(compiler).execute(spec);
setDidWork(result.getDidWork());
}
use of org.gradle.language.base.internal.tasks.SimpleStaleClassCleaner in project gradle by gradle.
the class JavaScriptMinify method compileJavaScriptSources.
@TaskAction
void compileJavaScriptSources() {
StaleClassCleaner cleaner = new SimpleStaleClassCleaner(getOutputs());
cleaner.setDestinationDir(getDestinationDir());
cleaner.execute();
MinifyFileVisitor visitor = new MinifyFileVisitor();
getSource().visit(visitor);
JavaScriptCompileSpec spec = new DefaultJavaScriptCompileSpec(visitor.relativeFiles, getDestinationDir(), getForkOptions());
getCompiler().execute(spec);
}
Aggregations