Examples of WorkResult


Examples of org.gradle.api.tasks.WorkResult

        if (!javaSource.isEmpty()) {
            spec.setSource(javaSource);
            javaCompiler.execute(spec);
        }

        return new WorkResult() {
            public boolean getDidWork() {
                return true;
            }
        };
    }
View Full Code Here

Examples of org.gradle.api.tasks.WorkResult

    }

    public <T extends CompileSpec> void execute(Compiler<T> compiler, T spec) {
        try {
            LOGGER.info("Executing {} in compiler daemon.", compiler);
            WorkResult result = compiler.execute(spec);
            LOGGER.info("Successfully executed {} in compiler daemon.", compiler);
            client.executed(new CompileResult(result.getDidWork(), null));
        } catch (Throwable t) {
            LOGGER.info("Exception executing {} in compiler daemon: {}.", compiler, t);
            client.executed(new CompileResult(true, t));
        }
    }
View Full Code Here

Examples of org.gradle.api.tasks.WorkResult

        return delegateCompiler.execute(spec);
    }

    protected WorkResult doCleanIncrementalCompile(NativeCompileSpec spec) {
        boolean deleted = cleanPreviousOutputs(spec);
        WorkResult compileResult = delegateCompiler.execute(spec);
        if (deleted && !compileResult.getDidWork()) {
            return new SimpleWorkResult(deleted);
        }
        return compileResult;
    }
View Full Code Here

Examples of org.gradle.api.tasks.WorkResult

        this.writer = writer;
        this.updater = updater;
    }

    public WorkResult execute(JavaCompileSpec spec) {
        WorkResult out = delegate.execute(spec);

        if (!(out instanceof RecompilationNotNecessary)) {
            //if recompilation was skipped
            //there's no point in updating because we have exactly the same output classes)
            updater.updateAnalysis(spec);
View Full Code Here

Examples of org.gradle.api.tasks.WorkResult

    protected JavaPlatform getPlatform() {
        return null;
    }

    private void performCompilation(JavaCompileSpec spec, Compiler<JavaCompileSpec> compiler) {
        WorkResult result = compiler.execute(spec);
        setDidWork(result.getDidWork());
    }
View Full Code Here

Examples of org.gradle.api.tasks.WorkResult

    }

    public WorkResult execute(final CopyActionProcessingStream stream) {
        final Set<RelativePath> visited = new HashSet<RelativePath>();

        WorkResult didWork = delegate.execute(new CopyActionProcessingStream() {
            public void process(final CopyActionProcessingStreamAction action) {
                stream.process(new CopyActionProcessingStreamAction() {
                    public void processFile(FileCopyDetailsInternal details) {
                        visited.add(details.getRelativePath());
                        action.processFile(details);
                    }
                });
            }
        });

        SyncCopyActionDecoratorFileVisitor fileVisitor = new SyncCopyActionDecoratorFileVisitor(visited);

        MinimalFileTree walker = new DirectoryFileTree(baseDestDir).postfix();
        walker.visit(fileVisitor);
        visited.clear();

        return new SimpleWorkResult(didWork.getDidWork() || fileVisitor.didWork);
    }
View Full Code Here

Examples of org.gradle.api.tasks.WorkResult

    public WorkResult execute(final CopyActionProcessingStream stream) {
        final Set<RelativePath> visitedDirs = new HashSet<RelativePath>();
        final ListMultimap<RelativePath, FileCopyDetailsInternal> pendingDirs = ArrayListMultimap.create();

        WorkResult result = delegate.execute(new CopyActionProcessingStream() {
            public void process(final CopyActionProcessingStreamAction action) {


                stream.process(new CopyActionProcessingStreamAction() {
                    public void processFile(FileCopyDetailsInternal details) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.