use of org.gradle.process.internal.worker.WorkerProcessBuilder in project gradle by gradle.
the class PlayApplicationRunner method createWorkerProcess.
private static WorkerProcess createWorkerProcess(File workingDir, WorkerProcessFactory workerFactory, PlayRunSpec spec, VersionedPlayRunAdapter adapter) {
WorkerProcessBuilder builder = workerFactory.create(new PlayWorkerServer(spec, adapter));
builder.setBaseName("Gradle Play Worker");
builder.sharedPackages("org.gradle.play.internal.run");
JavaExecHandleBuilder javaCommand = builder.getJavaCommand();
javaCommand.setWorkingDir(workingDir);
javaCommand.setMinHeapSize(spec.getForkOptions().getMemoryInitialSize());
javaCommand.setMaxHeapSize(spec.getForkOptions().getMemoryMaximumSize());
javaCommand.setJvmArgs(spec.getForkOptions().getJvmArgs());
return builder.build();
}
use of org.gradle.process.internal.worker.WorkerProcessBuilder in project gradle by gradle.
the class ForkingTestClassProcessor method forkProcess.
RemoteTestClassProcessor forkProcess() {
WorkerProcessBuilder builder = workerFactory.create(new TestWorker(processorFactory));
builder.setBaseName("Gradle Test Executor");
builder.setImplementationClasspath(getTestWorkerImplementationClasspath());
builder.applicationClasspath(classPath);
options.copyTo(builder.getJavaCommand());
buildConfigAction.execute(builder);
workerProcess = builder.build();
workerProcess.start();
ObjectConnection connection = workerProcess.getConnection();
connection.useParameterSerializers(TestEventSerializer.create());
connection.addIncoming(TestResultProcessor.class, resultProcessor);
RemoteTestClassProcessor remoteProcessor = connection.addOutgoing(RemoteTestClassProcessor.class);
connection.connect();
remoteProcessor.startProcessing();
return remoteProcessor;
}
Aggregations