gpt4 book ai didi

org.gradle.workers.WorkerExecutor类的使用及代码示例

转载 作者:知者 更新时间:2024-03-23 08:59:05 28 4
gpt4 key购买 nike

本文整理了Java中org.gradle.workers.WorkerExecutor类的一些代码示例,展示了WorkerExecutor类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WorkerExecutor类的具体详情如下:
包路径:org.gradle.workers.WorkerExecutor
类名称:WorkerExecutor

WorkerExecutor介绍

暂无

代码示例

代码示例来源:origin: gradle.plugin.org.codeartisans.gradle/gradle-wsdl-plugin

private void processWsdl( Wsdl wsdl ) {
  getWorkerExecutor().submit( WsImportRunnable.class, new Action<WorkerConfiguration>() {
    @Override
    public void execute( WorkerConfiguration config ) {
      config.setDisplayName( "Import WSDL " + wsdl.getName() + " into " + wsdl.getPackageName() );
      config.setParams( wsImportArgumentsFor( wsdl ) );
      config.setIsolationMode( IsolationMode.CLASSLOADER );
      config.classpath( jaxwsToolsConfiguration.getFiles() );
    }
  } );
}

代码示例来源:origin: gradle.plugin.com.github.anolivetree/gradle-clojure-plugin

public void await() {
 workerExecutor.await();
}

代码示例来源:origin: com.diffplug.gradle/image-grinder

remove(outOfDate.getFile());
  workerExecutor.submit(ProcessFile.class, workerConfig -> {
    workerConfig.setIsolationMode(IsolationMode.NONE);
    workerConfig.setParams(SerializableRef.create(ImageGrinderTask.this), outOfDate.getFile());
  remove(removed.getFile());
});
workerExecutor.await();
writeToCache(cache);

代码示例来源:origin: gradle.plugin.com.github.ramonwirsch/fopRenderer

@TaskAction
void run() {
  workerExecutor.submit(TransformWorker.class, (config) -> {
    config.setIsolationMode(IsolationMode.NONE);
    config.setParams(getStylesheet(), getOutputFile(), renderConfig.getRootSrc());
  });
}

代码示例来源:origin: melix/japicmp-gradle-plugin

@TaskAction
public void exec() {
  WorkerExecutor workerExecutor = getServices().get(WorkerExecutor.class);
  workerExecutor.submit(JApiCmpWorkerAction.class, new Action<WorkerConfiguration>() {
    @Override
    public void execute(final WorkerConfiguration workerConfiguration) {

代码示例来源:origin: gradle.plugin.com.github.ramonwirsch/fopRenderer

@TaskAction
private void execute(IncrementalTaskInputs inputs) {
  update = false;
  inputs.outOfDate(change -> {
    File file = change.getFile();
    logger.info("out of date: {}", file.getName());
    update = true;
  });
  inputs.removed(change -> {
    File file = change.getFile();
    logger.info("removed: {}", file);
    update = true;
  });
  try {
    String resourceBaseDir = renderConfig.getResourcesBaseDir().toURI().toURL().toExternalForm();
    workerExecutor.submit(RenderWorker.class, (config) -> {
      config.setIsolationMode(IsolationMode.NONE);
      config.setParams(getInputFile(), getOutputFile(), resourceBaseDir);
    });
  } catch (MalformedURLException e) {
    logger.error("ResourceBaseDir is incorrectly configured!", e);
  }
}

代码示例来源:origin: gradle.plugin.uk.co.boothen.gradle/gradle-wsimport

@TaskAction
public void taskAction() {
  for (Wsdl wsdl : wsdls) {
    getWorkerExecutor().submit(WsImportRunnable.class, workerConfiguration -> {
      workerConfiguration.setDisplayName("Importing WSDL");
      workerConfiguration.setParams(new WsImportConfiguration(wsdlSourceRoot,
                                  generatedSourceRoot,
                                  generatedClassesRoot,
                                  keep,
                                  extension,
                                  verbose,
                                  quiet,
                                  debug,
                                  xnocompile,
                                  xadditionalHeaders,
                                  xnoAddressingDatabinding,
                                  xdebug,
                                  target,
                                  wsdl));
      workerConfiguration.classpath(jaxwsToolsConfiguration.getFiles());
    });
  }
}

代码示例来源:origin: gradle.plugin.com.github.spotbugs/spotbugs-gradle-plugin

@TaskAction
public void run() {
  new SpotBugsClasspathValidator(JavaVersion.current()).validateClasspath(
      getSpotbugsClasspath().getFiles().stream().map(File::getName).collect(Collectors.toSet()));
  SpotBugsSpec spec = generateSpec();
  //workaround for https://github.com/spotbugs/spotbugs-gradle-plugin/issues/61
  if(reports.getEnabledReports().isEmpty()) {
    getProject().getLogger().lifecycle("WARNING: No SpotBugs report(s) were configured; aborting execution of {}", getPath());
    return;
  }
  workerExecutor.submit(SpotBugsRunner.class, config -> {
    config.params(spec, getIgnoreFailures(), reports.getFirstEnabled().getDestination());
    config.setClasspath(getSpotbugsClasspath());
    config.setForkMode(ForkMode.ALWAYS);
    config.forkOptions( options -> {
      options.setDebug(spec.isDebugEnabled());
      options.setJvmArgs(spec.getJvmArgs());
      options.setMaxHeapSize(spec.getMaxHeapSize());
    });
    config.setIsolationMode(IsolationMode.PROCESS);
  });
}

代码示例来源:origin: gradle.plugin.com.github.anolivetree/gradle-clojure-plugin

public void submit(Action<ClojureWorkerConfiguration> action) {
 ClojureWorkerConfiguration config = new ClojureWorkerConfiguration();
 action.execute(config);
 FileCollection realClasspath = config.getClasspath().plus(resolveShim());
 workerExecutor.submit(ClojureWorker.class, worker -> {
  worker.setIsolationMode(IsolationMode.PROCESS);
  worker.params(config.getNamespace(), config.getFunction(), config.getArgs());
  config.getConfigureFork().forEach(worker::forkOptions);
  worker.forkOptions(fork -> fork.systemProperty("shim.classpath", realClasspath.getAsPath()));
  worker.classpath(resolveWorker());
 });
}

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com