当前位置: 首页>>代码示例>>Java>>正文


Java WorkResult.getDidWork方法代码示例

本文整理汇总了Java中org.gradle.api.tasks.WorkResult.getDidWork方法的典型用法代码示例。如果您正苦于以下问题:Java WorkResult.getDidWork方法的具体用法?Java WorkResult.getDidWork怎么用?Java WorkResult.getDidWork使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.gradle.api.tasks.WorkResult的用法示例。


在下文中一共展示了WorkResult.getDidWork方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: execute

import org.gradle.api.tasks.WorkResult; //导入方法依赖的package包/类
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, preserveSpec);

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

    return new SimpleWorkResult(didWork.getDidWork() || fileVisitor.didWork);
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:23,代码来源:SyncCopyActionDecorator.java

示例2: execute

import org.gradle.api.tasks.WorkResult; //导入方法依赖的package包/类
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);
}
 
开发者ID:Pushjet,项目名称:Pushjet-Android,代码行数:23,代码来源:SyncCopyActionDecorator.java

示例3: execute

import org.gradle.api.tasks.WorkResult; //导入方法依赖的package包/类
public WorkResult execute(T spec) {
    boolean didWork = false;
    boolean windowsPathLimitation = OperatingSystem.current().isWindows();

    String objectFileExtension = OperatingSystem.current().isWindows() ? ".obj" : ".o";
    for (File sourceFile : spec.getSourceFiles()) {
        String objectFileName = FilenameUtils.removeExtension(sourceFile.getName()) + objectFileExtension;
        WorkResult result = commandLineTool.inWorkDirectory(spec.getObjectFileDir())
                .withArguments(new SingleSourceCompileArgTransformer<T>(sourceFile,
                                        objectFileName,
                                        new ShortCircuitArgsTransformer(argsTransfomer),
                                        windowsPathLimitation,
                                        false))
                .execute(spec);
        didWork = didWork || result.getDidWork();
    }
    return new SimpleWorkResult(didWork);
}
 
开发者ID:Pushjet,项目名称:Pushjet-Android,代码行数:19,代码来源:NativeCompiler.java

示例4: doCleanIncrementalCompile

import org.gradle.api.tasks.WorkResult; //导入方法依赖的package包/类
protected WorkResult doCleanIncrementalCompile(T spec) {
    boolean deleted = cleanPreviousOutputs(spec);
    WorkResult compileResult = delegateCompiler.execute(spec);
    if (deleted && !compileResult.getDidWork()) {
        return new SimpleWorkResult(deleted);
    }
    return compileResult;
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:9,代码来源:IncrementalNativeCompiler.java

示例5: doCleanIncrementalCompile

import org.gradle.api.tasks.WorkResult; //导入方法依赖的package包/类
protected WorkResult doCleanIncrementalCompile(NativeCompileSpec spec) {
    boolean deleted = cleanPreviousOutputs(spec);
    WorkResult compileResult = delegateCompiler.execute(spec);
    if (deleted && !compileResult.getDidWork()) {
        return new SimpleWorkResult(deleted);
    }
    return compileResult;
}
 
开发者ID:Pushjet,项目名称:Pushjet-Android,代码行数:9,代码来源:IncrementalNativeCompiler.java

示例6: execute

import org.gradle.api.tasks.WorkResult; //导入方法依赖的package包/类
public WorkResult execute(WindowsResourceCompileSpec spec) {
    boolean didWork = false;
    boolean windowsPathLimitation = OperatingSystem.current().isWindows();
    CommandLineTool<WindowsResourceCompileSpec> commandLineAssembler = commandLineTool.inWorkDirectory(spec.getObjectFileDir());
    for (File sourceFile : spec.getSourceFiles()) {
        WorkResult result = commandLineAssembler.withArguments(new RcCompilerArgsTransformer(sourceFile, windowsPathLimitation)).execute(spec);
        didWork |= result.getDidWork();
    }
    return new SimpleWorkResult(didWork);
}
 
开发者ID:Pushjet,项目名称:Pushjet-Android,代码行数:11,代码来源:WindowsResourceCompiler.java

示例7: execute

import org.gradle.api.tasks.WorkResult; //导入方法依赖的package包/类
public WorkResult execute(AssembleSpec spec) {
    boolean didWork = false;
    CommandLineTool<AssembleSpec> commandLineAssembler = commandLineTool.inWorkDirectory(spec.getObjectFileDir());
    for (File sourceFile : spec.getSourceFiles()) {
        WorkResult result = commandLineAssembler.withArguments(new AssemblerArgsTransformer(sourceFile)).execute(spec);
        didWork = didWork || result.getDidWork();
    }
    return new SimpleWorkResult(didWork);
}
 
开发者ID:Pushjet,项目名称:Pushjet-Android,代码行数:10,代码来源:Assembler.java

示例8: execute

import org.gradle.api.tasks.WorkResult; //导入方法依赖的package包/类
public WorkResult execute(T spec) {
    boolean didWork = false;
    for (File sourceFile : spec.getSourceFiles()) {
        String objectFileName = FilenameUtils.removeExtension(sourceFile.getName()) + ".obj";
        WorkResult result = commandLineTool.inWorkDirectory(spec.getObjectFileDir())
                .withArguments(new SingleSourceCompileArgTransformer<T>(sourceFile,
                                                                        objectFileName,
                                                                        new ShortCircuitArgsTransformer<T>(argsTransFormer),
                                                                        true,
                                                                        true))
                .execute(spec);
        didWork = didWork || result.getDidWork();
    }
    return new SimpleWorkResult(didWork);
}
 
开发者ID:Pushjet,项目名称:Pushjet-Android,代码行数:16,代码来源:NativeCompiler.java

示例9: doIncrementalCompile

import org.gradle.api.tasks.WorkResult; //导入方法依赖的package包/类
@Override
protected WorkResult doIncrementalCompile(IncrementalCompileProcessor processor, NativeCompileSpec spec) {
    processor.processSourceFiles(spec.getSourceFiles());
    boolean deleted = cleanPreviousOutputs(spec);
    WorkResult compileResult = delegateCompiler.execute(spec);
    if (deleted && !compileResult.getDidWork()) {
        return new SimpleWorkResult(deleted);
    }
    return compileResult;
}
 
开发者ID:Pushjet,项目名称:Pushjet-Android,代码行数:11,代码来源:CleanCompilingNativeCompiler.java

示例10: execute

import org.gradle.api.tasks.WorkResult; //导入方法依赖的package包/类
public WorkResult execute(AssembleSpec spec) {
    boolean didWork = false;
    CommandLineTool<AssembleSpec> commandLineAssembler = commandLineTool.inWorkDirectory(spec.getObjectFileDir());
    for (File sourceFile : spec.getSourceFiles()) {
        ArgsTransformer<AssembleSpec> arguments = new AssembleSpecToArgsList(sourceFile, spec.getObjectFileDir(), outputFileSuffix);
        arguments = new PostTransformActionArgsTransformer<AssembleSpec>(arguments, argsAction);
        WorkResult result = commandLineAssembler.withArguments(arguments).execute(spec);
        didWork = didWork || result.getDidWork();
    }
    return new SimpleWorkResult(didWork);
}
 
开发者ID:Pushjet,项目名称:Pushjet-Android,代码行数:12,代码来源:Assembler.java


注:本文中的org.gradle.api.tasks.WorkResult.getDidWork方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。