本文整理汇总了Java中org.gradle.workers.WorkerExecutor类的典型用法代码示例。如果您正苦于以下问题:Java WorkerExecutor类的具体用法?Java WorkerExecutor怎么用?Java WorkerExecutor使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
WorkerExecutor类属于org.gradle.workers包,在下文中一共展示了WorkerExecutor类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ClojureCompile
import org.gradle.workers.WorkerExecutor; //导入依赖的package包/类
@Inject
public ClojureCompile(WorkerExecutor workerExecutor) {
this.workerExecutor = new ClojureWorkerExecutor(getProject(), workerExecutor);
}
示例2: ClojureExec
import org.gradle.workers.WorkerExecutor; //导入依赖的package包/类
@Inject
public ClojureExec(WorkerExecutor workerExecutor) {
this.workerExecutor = new ClojureWorkerExecutor(getProject(), workerExecutor);
}
示例3: ClojureNRepl
import org.gradle.workers.WorkerExecutor; //导入依赖的package包/类
@Inject
public ClojureNRepl(WorkerExecutor workerExecutor) {
this.workerExecutor = new ClojureWorkerExecutor(getProject(), workerExecutor);
}
示例4: ClojureWorkerExecutor
import org.gradle.workers.WorkerExecutor; //导入依赖的package包/类
public ClojureWorkerExecutor(Project project, WorkerExecutor workerExecutor) {
this.project = project;
this.workerExecutor = workerExecutor;
}
示例5: JMHTask
import org.gradle.workers.WorkerExecutor; //导入依赖的package包/类
@Inject
public JMHTask(final WorkerExecutor workerExecutor) {
this.workerExecutor = workerExecutor;
}
示例6: exec
import org.gradle.workers.WorkerExecutor; //导入依赖的package包/类
@TaskAction
public void exec() {
WorkerExecutor workerExecutor = getServices().get(WorkerExecutor.class);
workerExecutor.submit(JApiCmpWorkerAction.class, new Action<WorkerConfiguration>() {
@Override
public void execute(final WorkerConfiguration workerConfiguration) {
workerConfiguration.setIsolationMode(IsolationMode.PROCESS);
Set<File> classpath = new HashSet<>();
if (richReport != null) {
for (RuleConfiguration configuration : richReport.getRules()) {
ProtectionDomain domain = configuration.getRuleClass().getProtectionDomain();
CodeSource codeSource = domain.getCodeSource();
if (codeSource != null) {
try {
classpath.add(new File(codeSource.getLocation().toURI()));
} catch (URISyntaxException e) {
// silent
}
}
}
}
workerConfiguration.setClasspath(classpath);
List<JApiCmpWorkerAction.Archive> baseline = JapicmpTask.this.oldArchives != null ? toArchives(JapicmpTask.this.oldArchives) : inferArchives(oldClasspath);
List<JApiCmpWorkerAction.Archive> current = JapicmpTask.this.newArchives != null ? toArchives(JapicmpTask.this.newArchives) : inferArchives(newClasspath);
workerConfiguration.setDisplayName("Comparing " + current + " with " + baseline);
workerConfiguration.params(
// we use a single configuration object, instead of passing each parameter directly,
// because the worker API doesn't support "null" values
new JapiCmpWorkerConfiguration(
getIncludeSynthetic(),
getIgnoreMissingClasses(),
getPackageIncludes(),
getPackageExcludes(),
getClassIncludes(),
getClassExcludes(),
getMethodIncludes(),
getMethodExcludes(),
getFieldIncludes(),
getFieldExcludes(),
getAnnotationIncludes(),
getAnnotationExcludes(),
toArchives(getOldClasspath()),
toArchives(getNewClasspath()),
baseline,
current,
getOnlyModified(),
getOnlyBinaryIncompatibleModified(),
getFailOnSourceIncompatibility(),
getAccessModifier(),
getXmlOutputFile(),
getHtmlOutputFile(),
getTxtOutputFile(),
getFailOnModification(),
getProject().getBuildDir(),
richReport
)
);
}
});
}