-
Notifications
You must be signed in to change notification settings - Fork 157
Expand file tree
/
Copy pathbuild.gradle
More file actions
54 lines (47 loc) · 2.17 KB
/
build.gradle
File metadata and controls
54 lines (47 loc) · 2.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
apply plugin: 'org.springframework.boot'
sourceSets {
main {
resources {
srcDir rootProject.file("config/dev")
}
}
}
dependencies {
// Corda dependencies.
compile "$corda_release_group:corda-rpc:$corda_release_version"
compile "net.corda:corda-jackson:$corda_release_version"
// CorDapp dependencies.
compile project(":contracts")
compile project(":workflows")
compile("org.springframework.boot:spring-boot-starter-websocket:$spring_boot_version") {
exclude group: "org.springframework.boot", module: "spring-boot-starter-logging"
}
compile "org.apache.logging.log4j:log4j-slf4j-impl:${log4j_version}"
compile "org.apache.logging.log4j:log4j-web:${log4j_version}"
compile "org.slf4j:jul-to-slf4j:$slf4j_version"
}
springBoot {
mainClassName = "net.corda.samples.example.webserver.Starter"
}
/* The Client is the communication channel between the external and the node. This task will help you immediately
* execute your rpc methods in the main method of the client.kt. You can somewhat see this as a quick test of making
* RPC calls to your nodes.
*/
task runTestClient(type: JavaExec, dependsOn: assemble) {
classpath = sourceSets.main.runtimeClasspath
main = 'net.corda.samples.example.Client'
args 'localhost:10006', 'user1', 'test'
}
/* This task will start the springboot server that connects to your node (via RPC connection). All of the http requests
* are in the Controller file. You can leave the Server.kt and NodeRPCConnection.kt file untouched for your use.
*/
task runPartyAServer(type: JavaExec, dependsOn: assemble) {
classpath = sourceSets.main.runtimeClasspath
main = 'net.corda.samples.example.webserver.Starter'
args '--server.port=50005', '--config.rpc.host=localhost', '--config.rpc.port=10006', '--config.rpc.username=user1', '--config.rpc.password=test'
}
task runPartyBServer(type: JavaExec, dependsOn: assemble) {
classpath = sourceSets.main.runtimeClasspath
main = 'net.corda.samples.example.webserver.Starter'
args '--server.port=50006', '--config.rpc.host=localhost', '--config.rpc.port=10009', '--config.rpc.username=user1', '--config.rpc.password=test'
}