mirror of
https://github.com/corda/corda.git
synced 2024-12-18 20:47:57 +00:00
151 lines
4.6 KiB
Groovy
151 lines
4.6 KiB
Groovy
import net.corda.plugins.Cordform
|
|
|
|
apply plugin: 'org.jetbrains.kotlin.jvm'
|
|
apply plugin: 'idea'
|
|
apply plugin: 'net.corda.plugins.quasar-utils'
|
|
apply plugin: 'net.corda.plugins.cordapp'
|
|
apply plugin: 'net.corda.plugins.cordformation'
|
|
|
|
dependencies {
|
|
if (System.getProperty('excludeShell') == null) {
|
|
cordaDriver "net.corda:corda-shell:$corda_shell_version"
|
|
}
|
|
|
|
implementation project(":core-test-utils")
|
|
implementation project(":test-utils")
|
|
implementation "org.slf4j:slf4j-api:$slf4j_version"
|
|
|
|
// The bank of corda CorDapp depends upon Cash CorDapp features
|
|
cordapp project(':finance:contracts')
|
|
cordapp project(':finance:workflows')
|
|
|
|
// Cordformation needs a SLF4J implementation when executing the Network
|
|
// Bootstrapper, but Log4J doesn't shutdown completely from within Gradle.
|
|
// Use a much simpler SLF4J implementation here instead.
|
|
cordaRuntimeOnly "org.slf4j:slf4j-simple:$slf4j_version"
|
|
|
|
// Corda integration dependencies
|
|
corda project(path: ":node:capsule", configuration: 'runtimeArtifacts')
|
|
corda project(path: ":testing:testserver:testcapsule:", configuration: 'runtimeArtifacts')
|
|
|
|
cordaProvided project(':core')
|
|
cordaProvided project(':client:jfx')
|
|
cordaProvided project(':client:rpc')
|
|
cordaProvided(project(':testing:testserver')) {
|
|
exclude group: "org.apache.logging.log4j"
|
|
}
|
|
cordaProvided (project(':node-driver')) {
|
|
exclude group: "org.apache.logging.log4j"
|
|
}
|
|
|
|
cordaBootstrapper "org.slf4j:slf4j-simple:$slf4j_version"
|
|
cordaBootstrapper project(":node-api")
|
|
|
|
// Javax is required for webapis
|
|
implementation "org.glassfish.jersey.core:jersey-server:${jersey_version}"
|
|
implementation "net.sf.jopt-simple:jopt-simple:$jopt_simple_version"
|
|
implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_version"
|
|
|
|
// Test dependencies
|
|
testImplementation "org.junit.jupiter:junit-jupiter-api:${junit_jupiter_version}"
|
|
testImplementation "junit:junit:$junit_version"
|
|
|
|
testRuntimeOnly "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}"
|
|
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junit_jupiter_version}"
|
|
testRuntimeOnly "org.junit.platform:junit-platform-launcher:${junit_platform_version}"
|
|
}
|
|
|
|
configurations.cordaCordapp.canBeResolved = true
|
|
tasks.register('deployNodes', Cordform) {
|
|
dependsOn('jar', ':node:capsule:assemble', ':testing:testserver:testcapsule::assemble')
|
|
nodeDefaults {
|
|
cordapp project(':finance:workflows')
|
|
cordapp project(':finance:contracts')
|
|
runSchemaMigration = true
|
|
}
|
|
node {
|
|
name "O=Notary Node,L=Zurich,C=CH"
|
|
notary = [validating : true,
|
|
serviceLegalName: "O=Notary Service,L=Zurich,C=CH"
|
|
]
|
|
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"]
|
|
]
|
|
cordapp(project(':finance:workflows')) {
|
|
config "issuableCurrencies = [ USD ]"
|
|
}
|
|
}
|
|
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"]
|
|
]
|
|
}
|
|
}
|
|
|
|
idea {
|
|
module {
|
|
downloadJavadoc = true // defaults to false
|
|
downloadSources = true
|
|
}
|
|
}
|
|
|
|
tasks.register('runRPCCashIssue', JavaExec) {
|
|
classpath = sourceSets.main.runtimeClasspath
|
|
mainClass = 'net.corda.bank.IssueCash'
|
|
|
|
args '--role'
|
|
args 'ISSUE_CASH_RPC'
|
|
args '--quantity'
|
|
args 20000
|
|
args '--currency'
|
|
args 'USD'
|
|
}
|
|
|
|
tasks.register('runWebCashIssue', JavaExec) {
|
|
classpath = sourceSets.main.runtimeClasspath
|
|
mainClass = 'net.corda.bank.IssueCash'
|
|
|
|
args '--role'
|
|
args 'ISSUE_CASH_WEB'
|
|
args '--quantity'
|
|
args 30000
|
|
args '--currency'
|
|
args 'GBP'
|
|
}
|
|
|
|
jar {
|
|
manifest {
|
|
attributes(
|
|
'Automatic-Module-Name': 'net.corda.samples.demos.bankofcorda'
|
|
)
|
|
}
|
|
}
|
|
|
|
cordapp {
|
|
targetPlatformVersion corda_platform_version.toInteger()
|
|
}
|