Exemplo n.º 1
0
 public WorkResult execute(WindowsResourceCompileSpec spec) {
   boolean didWork = false;
   boolean windowsPathLimitation = OperatingSystem.current().isWindows();
   MutableCommandLineToolInvocation invocation = baseInvocation.copy();
   spec = specTransformer.transform(spec);
   for (File sourceFile : spec.getSourceFiles()) {
     RcCompilerArgsTransformer argsTransformer =
         new RcCompilerArgsTransformer(sourceFile, windowsPathLimitation);
     invocation.setArgs(argsTransformer.transform(spec));
     invocation.setWorkDirectory(spec.getObjectFileDir());
     WorkResult result = commandLineTool.execute(invocation);
     didWork |= result.getDidWork();
   }
   return new SimpleWorkResult(didWork);
 }
Exemplo n.º 2
0
 private void performCompilation(JavaCompileSpec spec, Compiler<JavaCompileSpec> compiler) {
   WorkResult result = compiler.execute(spec);
   setDidWork(result.getDidWork());
 }