本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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;
}
示例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;
}
示例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);
}
示例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);
}
示例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);
}
示例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;
}
示例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);
}