Search in sources :

Example 6 with SimpleStaleClassCleaner

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(getDestinationDirectory().get().getAsFile());
    cleaner.execute();
    if (getSource().isEmpty()) {
        setDidWork(cleaner.getDidWork());
        return;
    }
    LinkerSpec spec = createLinkerSpec();
    spec.setTargetPlatform(getTargetPlatform().get());
    spec.setTempDir(getTemporaryDir());
    spec.setOutputFile(getLinkedFile().get().getAsFile());
    spec.objectFiles(getSource());
    spec.libraries(getLibs());
    spec.args(getLinkerArgs().get());
    spec.setDebuggable(getDebuggable().get());
    BuildOperationLogger operationLogger = getOperationLoggerFactory().newOperationLogger(getName(), getTemporaryDir());
    spec.setOperationLogger(operationLogger);
    Compiler<LinkerSpec> compiler = createCompiler();
    compiler = BuildOperationLoggingCompilerDecorator.wrap(compiler);
    WorkResult result = compiler.execute(spec);
    setDidWork(result.getDidWork());
}
Also used : LinkerSpec(org.gradle.nativeplatform.internal.LinkerSpec) BuildOperationLogger(org.gradle.internal.operations.logging.BuildOperationLogger) WorkResult(org.gradle.api.tasks.WorkResult) SimpleStaleClassCleaner(org.gradle.language.base.internal.tasks.SimpleStaleClassCleaner) TaskAction(org.gradle.api.tasks.TaskAction)

Example 7 with SimpleStaleClassCleaner

use of org.gradle.language.base.internal.tasks.SimpleStaleClassCleaner in project gradle by gradle.

the class ProcessResources method copy.

@Override
protected void copy() {
    StaleClassCleaner cleaner = new SimpleStaleClassCleaner(getOutputs());
    cleaner.setDestinationDir(getDestinationDir());
    cleaner.execute();
    super.copy();
}
Also used : StaleClassCleaner(org.gradle.language.base.internal.tasks.StaleClassCleaner) SimpleStaleClassCleaner(org.gradle.language.base.internal.tasks.SimpleStaleClassCleaner) SimpleStaleClassCleaner(org.gradle.language.base.internal.tasks.SimpleStaleClassCleaner)

Example 8 with SimpleStaleClassCleaner

use of org.gradle.language.base.internal.tasks.SimpleStaleClassCleaner in project gradle by gradle.

the class IncrementalSwiftCompiler method cleanPreviousOutputs.

private boolean cleanPreviousOutputs(SwiftCompileSpec spec) {
    SimpleStaleClassCleaner cleaner = new SimpleStaleClassCleaner(outputs);
    cleaner.setDestinationDir(spec.getObjectFileDir());
    cleaner.execute();
    return cleaner.getDidWork();
}
Also used : SimpleStaleClassCleaner(org.gradle.language.base.internal.tasks.SimpleStaleClassCleaner)

Aggregations

SimpleStaleClassCleaner (org.gradle.language.base.internal.tasks.SimpleStaleClassCleaner)8 TaskAction (org.gradle.api.tasks.TaskAction)3 StaleClassCleaner (org.gradle.language.base.internal.tasks.StaleClassCleaner)3 WorkResult (org.gradle.api.tasks.WorkResult)2 BuildOperationLogger (org.gradle.internal.operations.logging.BuildOperationLogger)2 DefaultAssembleSpec (org.gradle.language.assembler.internal.DefaultAssembleSpec)1 LinkerSpec (org.gradle.nativeplatform.internal.LinkerSpec)1 NativePlatformInternal (org.gradle.nativeplatform.platform.internal.NativePlatformInternal)1 NativeToolChainInternal (org.gradle.nativeplatform.toolchain.internal.NativeToolChainInternal)1 AssembleSpec (org.gradle.nativeplatform.toolchain.internal.compilespec.AssembleSpec)1 DefaultJavaScriptCompileSpec (org.gradle.play.internal.javascript.DefaultJavaScriptCompileSpec)1 JavaScriptCompileSpec (org.gradle.play.internal.javascript.JavaScriptCompileSpec)1