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 {
|
|
|
|
deployTo = "./build/nodes"
|
|
|
|
notaryType = "corda.notary.validating.raft"
|
|
|
|
notaryName = "Raft"
|
|
|
|
advertisedNotary = "$notaryType|$notaryName"
|
|
|
|
}
|
|
|
|
|
|
|
|
sourceSets {
|
|
|
|
main {
|
|
|
|
resources {
|
|
|
|
srcDir "../../config/dev"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
test {
|
|
|
|
resources {
|
|
|
|
srcDir "../../config/test"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
task generateNotaryIdentity(type: JavaExec) {
|
|
|
|
classpath = sourceSets.main.runtimeClasspath
|
|
|
|
main = "net.corda.node.utilities.ServiceIdentityGeneratorKt"
|
2017-01-16 13:48:52 +00:00
|
|
|
def nodeDirs = ["$deployTo/Notary1", "$deployTo/Notary2", "$deployTo/Notary3"].join(",")
|
2016-11-22 18:09:56 +00:00
|
|
|
args = [nodeDirs, notaryType, notaryName]
|
|
|
|
}
|
|
|
|
|
2017-04-04 14:45:41 +00:00
|
|
|
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar', 'generateNotaryIdentity']) {
|
2016-11-22 18:09:56 +00:00
|
|
|
directory deployTo
|
|
|
|
networkMap "Notary 1"
|
2017-02-06 15:57:19 +00:00
|
|
|
node {
|
|
|
|
name "Party"
|
|
|
|
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',
|
|
|
|
'StartFlow.net.corda.flows.NotaryFlow$Client'
|
|
|
|
]]]
|
|
|
|
}
|
|
|
|
node {
|
|
|
|
name "Counterparty"
|
|
|
|
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 {
|
|
|
|
name "Notary 1"
|
|
|
|
nearestCity "London"
|
|
|
|
advertisedServices = [advertisedNotary]
|
2017-03-17 10:32:14 +00:00
|
|
|
p2pPort 10008
|
|
|
|
rpcPort 10009
|
2016-11-22 18:09:56 +00:00
|
|
|
cordapps = []
|
|
|
|
notaryNodePort 11002
|
|
|
|
}
|
|
|
|
node {
|
|
|
|
name "Notary 2"
|
|
|
|
nearestCity "London"
|
|
|
|
advertisedServices = [advertisedNotary]
|
2017-03-17 10:32:14 +00:00
|
|
|
p2pPort 10011
|
|
|
|
rpcPort 10012
|
2016-11-22 18:09:56 +00:00
|
|
|
cordapps = []
|
|
|
|
notaryNodePort 11004
|
|
|
|
notaryClusterAddresses = ["localhost:11002"]
|
|
|
|
}
|
|
|
|
node {
|
|
|
|
name "Notary 3"
|
|
|
|
nearestCity "London"
|
|
|
|
advertisedServices = [advertisedNotary]
|
2017-03-17 10:32:14 +00:00
|
|
|
p2pPort 10014
|
|
|
|
rpcPort 10015
|
2016-11-22 18:09:56 +00:00
|
|
|
cordapps = []
|
|
|
|
notaryNodePort 11006
|
|
|
|
notaryClusterAddresses = ["localhost:11002"]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
task notarise(type: JavaExec) {
|
|
|
|
classpath = sourceSets.main.runtimeClasspath
|
|
|
|
main = 'net.corda.notarydemo.NotaryDemoKt'
|
|
|
|
}
|
|
|
|
|