2016-11-18 17:51:12 +00:00
|
|
|
apply plugin: 'java'
|
|
|
|
apply plugin: 'kotlin'
|
|
|
|
apply plugin: 'idea'
|
|
|
|
apply plugin: 'net.corda.plugins.quasar-utils'
|
2017-10-09 19:08:08 +00:00
|
|
|
apply plugin: 'net.corda.plugins.cordapp'
|
2016-11-18 17:51:12 +00:00
|
|
|
apply plugin: 'net.corda.plugins.cordformation'
|
|
|
|
|
|
|
|
dependencies {
|
2018-04-24 13:03:41 +00:00
|
|
|
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
2016-11-18 17:51:12 +00:00
|
|
|
|
2017-08-15 08:14:15 +00:00
|
|
|
// The bank of corda CorDapp depends upon Cash CorDapp features
|
2018-12-19 18:02:51 +00:00
|
|
|
cordapp project(':finance:contracts')
|
|
|
|
cordapp project(':finance:workflows')
|
2017-08-15 08:14:15 +00:00
|
|
|
|
2016-11-18 17:51:12 +00:00
|
|
|
// Corda integration dependencies
|
2018-10-15 20:11:52 +00:00
|
|
|
cordaRuntime project(path: ":node:capsule", configuration: 'runtimeArtifacts')
|
|
|
|
cordaRuntime project(path: ":webserver:webcapsule", configuration: 'runtimeArtifacts')
|
2017-07-27 16:53:51 +00:00
|
|
|
cordaCompile project(':core')
|
|
|
|
cordaCompile project(':client:jfx')
|
|
|
|
cordaCompile project(':client:rpc')
|
|
|
|
cordaCompile project(':webserver')
|
2017-09-05 08:50:51 +00:00
|
|
|
cordaCompile project(':node-driver')
|
2016-11-18 17:51:12 +00:00
|
|
|
|
|
|
|
// Javax is required for webapis
|
|
|
|
compile "org.glassfish.jersey.core:jersey-server:${jersey_version}"
|
2017-07-31 16:18:29 +00:00
|
|
|
|
|
|
|
// Test dependencies
|
|
|
|
testCompile "junit:junit:$junit_version"
|
2016-11-18 17:51:12 +00:00
|
|
|
}
|
|
|
|
|
2018-10-15 20:11:52 +00:00
|
|
|
def nodeTask = tasks.getByPath(':node:capsule:assemble')
|
|
|
|
def webTask = tasks.getByPath(':webserver:webcapsule:assemble')
|
|
|
|
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar', nodeTask, webTask]) {
|
2018-08-24 15:29:14 +00:00
|
|
|
nodeDefaults {
|
2018-12-19 18:02:51 +00:00
|
|
|
cordapp project(':finance:workflows')
|
|
|
|
cordapp project(':finance:contracts')
|
2018-08-24 15:29:14 +00:00
|
|
|
}
|
|
|
|
node {
|
|
|
|
name "O=Notary Service,L=Zurich,C=CH"
|
|
|
|
notary = [validating: true]
|
|
|
|
p2pPort 10002
|
|
|
|
rpcSettings {
|
|
|
|
address "localhost:10003"
|
|
|
|
adminAddress "localhost:10004"
|
|
|
|
}
|
|
|
|
extraConfig = [h2Settings: [address: "localhost:10016"]]
|
|
|
|
}
|
|
|
|
node {
|
|
|
|
name "O=BankOfCorda,L=London,C=GB"
|
|
|
|
p2pPort 10005
|
|
|
|
rpcSettings {
|
|
|
|
address "localhost:10006"
|
|
|
|
adminAddress "localhost:10015"
|
|
|
|
}
|
|
|
|
webPort 10007
|
|
|
|
rpcUsers = [[user: "bankUser", password: "test", permissions: ["ALL"]]]
|
|
|
|
extraConfig = [
|
|
|
|
h2Settings: [address: "localhost:10017"]
|
|
|
|
]
|
2018-12-19 18:02:51 +00:00
|
|
|
cordapp(project(':finance:workflows')) {
|
2018-10-22 17:56:30 +00:00
|
|
|
config "issuableCurrencies = [ USD ]"
|
|
|
|
}
|
2018-08-24 15:29:14 +00:00
|
|
|
}
|
|
|
|
node {
|
|
|
|
name "O=BigCorporation,L=New York,C=US"
|
|
|
|
p2pPort 10008
|
|
|
|
rpcSettings {
|
|
|
|
address "localhost:10009"
|
|
|
|
adminAddress "localhost:10011"
|
|
|
|
}
|
|
|
|
webPort 10010
|
|
|
|
rpcUsers = [[user: "bigCorpUser", password: "test", permissions: ["ALL"]]]
|
|
|
|
extraConfig = [
|
|
|
|
h2Settings: [address: "localhost:10018"]
|
|
|
|
]
|
|
|
|
}
|
2016-11-18 17:51:12 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
idea {
|
|
|
|
module {
|
|
|
|
downloadJavadoc = true // defaults to false
|
|
|
|
downloadSources = true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
task runRPCCashIssue(type: JavaExec) {
|
|
|
|
classpath = sourceSets.main.runtimeClasspath
|
2017-11-23 22:27:24 +00:00
|
|
|
main = 'net.corda.bank.IssueCash'
|
2016-11-18 17:51:12 +00:00
|
|
|
args '--role'
|
|
|
|
args 'ISSUE_CASH_RPC'
|
|
|
|
args '--quantity'
|
|
|
|
args 20000
|
|
|
|
args '--currency'
|
|
|
|
args 'USD'
|
|
|
|
}
|
|
|
|
|
|
|
|
task runWebCashIssue(type: JavaExec) {
|
|
|
|
classpath = sourceSets.main.runtimeClasspath
|
2017-11-23 22:27:24 +00:00
|
|
|
main = 'net.corda.bank.IssueCash'
|
2016-11-18 17:51:12 +00:00
|
|
|
args '--role'
|
|
|
|
args 'ISSUE_CASH_WEB'
|
|
|
|
args '--quantity'
|
|
|
|
args 30000
|
|
|
|
args '--currency'
|
|
|
|
args 'GBP'
|
2017-01-03 14:15:23 +00:00
|
|
|
}
|
2017-10-06 14:37:33 +00:00
|
|
|
|
|
|
|
jar {
|
|
|
|
manifest {
|
|
|
|
attributes(
|
|
|
|
'Automatic-Module-Name': 'net.corda.samples.demos.bankofcorda'
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
2018-10-15 20:11:52 +00:00
|
|
|
|
|
|
|
cordapp {
|
2018-12-14 09:39:23 +00:00
|
|
|
targetPlatformVersion corda_platform_version.toInteger()
|
|
|
|
minimumPlatformVersion 1
|
2019-01-23 13:26:33 +00:00
|
|
|
info {
|
|
|
|
name "Bank of Corda Demo"
|
|
|
|
version "1"
|
2018-12-14 09:39:23 +00:00
|
|
|
vendor "R3"
|
2018-10-15 20:11:52 +00:00
|
|
|
}
|
2019-01-23 13:26:33 +00:00
|
|
|
}
|