2017-05-16 10:30:50 +00:00
|
|
|
import net.corda.plugins.Cordform
|
|
|
|
|
2016-11-22 18:09:56 +00:00
|
|
|
apply plugin: 'java'
|
|
|
|
apply plugin: 'kotlin'
|
|
|
|
apply plugin: 'idea'
|
|
|
|
apply plugin: 'net.corda.plugins.quasar-utils'
|
|
|
|
apply plugin: 'net.corda.plugins.publish-utils'
|
|
|
|
apply plugin: 'net.corda.plugins.cordformation'
|
|
|
|
apply plugin: 'maven-publish'
|
|
|
|
|
|
|
|
ext {
|
2017-05-12 10:33:26 +00:00
|
|
|
deployTo = "build/nodes"
|
2016-11-22 18:09:56 +00:00
|
|
|
notaryType = "corda.notary.validating.raft"
|
2017-05-05 14:16:44 +00:00
|
|
|
notaryName = "CN=Raft,O=R3,OU=corda,L=Zurich,C=CH"
|
2016-11-22 18:09:56 +00:00
|
|
|
advertisedNotary = "$notaryType|$notaryName"
|
|
|
|
}
|
|
|
|
|
|
|
|
configurations {
|
|
|
|
integrationTestCompile.extendsFrom testCompile
|
|
|
|
integrationTestRuntime.extendsFrom testRuntime
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2017-03-30 15:27:01 +00:00
|
|
|
compile "org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlin_version"
|
2017-01-03 14:15:23 +00:00
|
|
|
testCompile "junit:junit:$junit_version"
|
2016-11-22 18:09:56 +00:00
|
|
|
|
|
|
|
// Corda integration dependencies
|
2016-12-06 15:03:33 +00:00
|
|
|
runtime project(path: ":node:capsule", configuration: 'runtimeArtifacts')
|
2017-03-30 16:34:32 +00:00
|
|
|
runtime project(path: ":webserver:webcapsule", configuration: 'runtimeArtifacts')
|
2016-11-22 18:09:56 +00:00
|
|
|
compile project(':core')
|
2017-03-21 19:45:12 +00:00
|
|
|
compile project(':client:jfx')
|
2017-03-22 15:52:54 +00:00
|
|
|
compile project(':client:rpc')
|
2016-11-22 18:09:56 +00:00
|
|
|
compile project(':test-utils')
|
|
|
|
|
|
|
|
// Javax is required for webapis
|
|
|
|
compile "org.glassfish.jersey.core:jersey-server:${jersey_version}"
|
|
|
|
}
|
|
|
|
|
|
|
|
idea {
|
|
|
|
module {
|
|
|
|
downloadJavadoc = true // defaults to false
|
|
|
|
downloadSources = true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
publishing {
|
|
|
|
publications {
|
|
|
|
jarAndSources(MavenPublication) {
|
|
|
|
from components.java
|
|
|
|
artifactId 'raftnotarydemo'
|
|
|
|
|
|
|
|
artifact sourceJar
|
|
|
|
artifact javadocJar
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-05-12 10:33:26 +00:00
|
|
|
task cleanNodes {
|
|
|
|
doLast {
|
|
|
|
delete deployTo
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
task generateNotaryIdentity(type: JavaExec, dependsOn: 'cleanNodes') {
|
2016-11-22 18:09:56 +00:00
|
|
|
classpath = sourceSets.main.runtimeClasspath
|
|
|
|
main = "net.corda.node.utilities.ServiceIdentityGeneratorKt"
|
2017-05-03 09:46:27 +00:00
|
|
|
def nodeDirs = ["$deployTo/Notary1",
|
|
|
|
"$deployTo/Notary2",
|
|
|
|
"$deployTo/Notary3"].join("|")
|
2016-11-22 18:09:56 +00:00
|
|
|
args = [nodeDirs, notaryType, notaryName]
|
|
|
|
}
|
|
|
|
|
2017-05-16 10:30:50 +00:00
|
|
|
task deployNodes(type: Cordform, dependsOn: ['jar', generateNotaryIdentity]) {
|
2016-11-22 18:09:56 +00:00
|
|
|
directory deployTo
|
2017-04-13 16:41:54 +00:00
|
|
|
networkMap "CN=Notary 1,O=R3,OU=corda,L=London,C=UK"
|
2017-02-06 15:57:19 +00:00
|
|
|
node {
|
2017-05-12 10:33:26 +00:00
|
|
|
name "CN=Alice Corp,O=Alice Corp,L=London,C=UK"
|
2017-02-06 15:57:19 +00:00
|
|
|
nearestCity "London"
|
|
|
|
advertisedServices = []
|
2017-03-17 10:32:14 +00:00
|
|
|
p2pPort 10002
|
|
|
|
rpcPort 10003
|
2017-02-06 15:57:19 +00:00
|
|
|
cordapps = []
|
2017-04-07 10:23:25 +00:00
|
|
|
rpcUsers = [['username': "demo", 'password': "demo", 'permissions': [
|
2017-02-06 15:57:19 +00:00
|
|
|
'StartFlow.net.corda.notarydemo.flows.DummyIssueAndMove',
|
2017-05-16 10:30:50 +00:00
|
|
|
'StartFlow.net.corda.notarydemo.flows.RPCStartableNotaryFlowClient'
|
2017-02-06 15:57:19 +00:00
|
|
|
]]]
|
|
|
|
}
|
|
|
|
node {
|
2017-05-12 10:33:26 +00:00
|
|
|
name "CN=Bob Plc,O=Bob Plc,L=London,C=UK"
|
2017-02-06 15:57:19 +00:00
|
|
|
nearestCity "New York"
|
|
|
|
advertisedServices = []
|
2017-03-17 10:32:14 +00:00
|
|
|
p2pPort 10005
|
|
|
|
rpcPort 10006
|
2017-02-06 15:57:19 +00:00
|
|
|
cordapps = []
|
|
|
|
}
|
2016-11-22 18:09:56 +00:00
|
|
|
node {
|
2017-04-13 16:41:54 +00:00
|
|
|
name "CN=Notary 1,O=R3,OU=corda,L=London,C=UK"
|
2016-11-22 18:09:56 +00:00
|
|
|
nearestCity "London"
|
|
|
|
advertisedServices = [advertisedNotary]
|
2017-05-12 10:33:26 +00:00
|
|
|
p2pPort 10009
|
|
|
|
rpcPort 10010
|
2016-11-22 18:09:56 +00:00
|
|
|
cordapps = []
|
2017-05-12 10:33:26 +00:00
|
|
|
notaryNodePort 10008
|
2016-11-22 18:09:56 +00:00
|
|
|
}
|
|
|
|
node {
|
2017-04-13 16:41:54 +00:00
|
|
|
name "CN=Notary 2,O=R3,OU=corda,L=London,C=UK"
|
2016-11-22 18:09:56 +00:00
|
|
|
nearestCity "London"
|
|
|
|
advertisedServices = [advertisedNotary]
|
2017-05-12 10:33:26 +00:00
|
|
|
p2pPort 10013
|
|
|
|
rpcPort 10014
|
2016-11-22 18:09:56 +00:00
|
|
|
cordapps = []
|
2017-05-12 10:33:26 +00:00
|
|
|
notaryNodePort 10012
|
|
|
|
notaryClusterAddresses = ["localhost:10008"]
|
2016-11-22 18:09:56 +00:00
|
|
|
}
|
|
|
|
node {
|
2017-04-13 16:41:54 +00:00
|
|
|
name "CN=Notary 3,O=R3,OU=corda,L=London,C=UK"
|
2016-11-22 18:09:56 +00:00
|
|
|
nearestCity "London"
|
|
|
|
advertisedServices = [advertisedNotary]
|
2017-05-12 10:33:26 +00:00
|
|
|
p2pPort 10017
|
|
|
|
rpcPort 10018
|
2016-11-22 18:09:56 +00:00
|
|
|
cordapps = []
|
2017-05-12 10:33:26 +00:00
|
|
|
notaryNodePort 10016
|
|
|
|
notaryClusterAddresses = ["localhost:10008"]
|
2016-11-22 18:09:56 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
task notarise(type: JavaExec) {
|
|
|
|
classpath = sourceSets.main.runtimeClasspath
|
|
|
|
main = 'net.corda.notarydemo.NotaryDemoKt'
|
|
|
|
}
|