Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an option parameter to the startCorda gradle task #39

Open
wants to merge 1 commit into
base: release/corda-5-beta-1
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion buildSrc/src/main/groovy/csde.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,11 @@ tasks.register("startCorda") {
dependsOn('getDevCordaLite', 'getPostgresJDBC')
doLast {
mkdir devEnvWorkspace
cordaLifeCycle.startCorda()
// Default port number to be used by Corda 5 workers
// However, note that using port 7000 on macOS may not be able to start the process
// because this port is used by AirPlay by default
def port = Integer.parseInt(project.findProperty("port") ?: "7000")
cordaLifeCycle.startCorda(port)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public CordaLifeCycleHelper(ProjectContext _pc) {
}


public void startCorda() throws IOException {
public void startCorda(Integer port) throws IOException {
PrintStream pidStore = new PrintStream(new FileOutputStream(pc.cordaPidCache));
File combinedWorkerJar = pc.project.getConfigurations().getByName("combinedWorker").getSingleFile();

Expand All @@ -45,6 +45,7 @@ public void startCorda() throws IOException {
"-jar",
combinedWorkerJar.toString(),
"--instanceId=0",
"-p="+port,
"-mbus.busType=DATABASE",
"-spassphrase=password",
"-ssalt=salt",
Expand Down