mirror of
https://github.com/corda/corda.git
synced 2024-12-20 13:33:12 +00:00
9e43df36d3
* CORDA-304: Refactor :client modules into :client:javafx and :client:mock. * CORDA-304: Add :client:mock to Dokka tasks, and remove unused integrationTest task. * CORDA-304: Migrate DriverBasedTest from node into test-utils. * CORDA-304: Rename .fx. package to .jfx. to prevent confusion with "exchange rate". * CORDA-304: Rename module to ':client:jfx'.
149 lines
3.7 KiB
Groovy
149 lines
3.7 KiB
Groovy
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"
|
|
}
|
|
|
|
repositories {
|
|
mavenLocal()
|
|
mavenCentral()
|
|
jcenter()
|
|
maven {
|
|
url 'https://dl.bintray.com/kotlin/exposed'
|
|
}
|
|
}
|
|
|
|
sourceSets {
|
|
main {
|
|
resources {
|
|
srcDir "../../config/dev"
|
|
}
|
|
}
|
|
test {
|
|
resources {
|
|
srcDir "../../config/test"
|
|
}
|
|
}
|
|
}
|
|
|
|
configurations {
|
|
integrationTestCompile.extendsFrom testCompile
|
|
integrationTestRuntime.extendsFrom testRuntime
|
|
}
|
|
|
|
dependencies {
|
|
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
testCompile "junit:junit:$junit_version"
|
|
|
|
// Corda integration dependencies
|
|
runtime project(path: ":node:capsule", configuration: 'runtimeArtifacts')
|
|
runtime project(path: ":node:webserver:webcapsule", configuration: 'runtimeArtifacts')
|
|
compile project(':core')
|
|
compile project(':client:jfx')
|
|
compile project(':node')
|
|
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"
|
|
def nodeDirs = ["$deployTo/Notary1", "$deployTo/Notary2", "$deployTo/Notary3"].join(",")
|
|
args = [nodeDirs, notaryType, notaryName]
|
|
}
|
|
|
|
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['build', 'generateNotaryIdentity']) {
|
|
directory deployTo
|
|
networkMap "Notary 1"
|
|
node {
|
|
name "Party"
|
|
nearestCity "London"
|
|
advertisedServices = []
|
|
p2pPort 10002
|
|
rpcPort 10003
|
|
webPort 10004
|
|
cordapps = []
|
|
rpcUsers = [['user': "demo", 'password': "demo", 'permissions': [
|
|
'StartFlow.net.corda.notarydemo.flows.DummyIssueAndMove',
|
|
'StartFlow.net.corda.flows.NotaryFlow$Client'
|
|
]]]
|
|
}
|
|
node {
|
|
name "Counterparty"
|
|
nearestCity "New York"
|
|
advertisedServices = []
|
|
p2pPort 10005
|
|
rpcPort 10006
|
|
webPort 10007
|
|
cordapps = []
|
|
}
|
|
node {
|
|
name "Notary 1"
|
|
nearestCity "London"
|
|
advertisedServices = [advertisedNotary]
|
|
p2pPort 10008
|
|
rpcPort 10009
|
|
webPort 10010
|
|
cordapps = []
|
|
notaryNodePort 11002
|
|
}
|
|
node {
|
|
name "Notary 2"
|
|
nearestCity "London"
|
|
advertisedServices = [advertisedNotary]
|
|
p2pPort 10011
|
|
rpcPort 10012
|
|
webPort 10013
|
|
cordapps = []
|
|
notaryNodePort 11004
|
|
notaryClusterAddresses = ["localhost:11002"]
|
|
}
|
|
node {
|
|
name "Notary 3"
|
|
nearestCity "London"
|
|
advertisedServices = [advertisedNotary]
|
|
p2pPort 10014
|
|
rpcPort 10015
|
|
webPort 10016
|
|
cordapps = []
|
|
notaryNodePort 11006
|
|
notaryClusterAddresses = ["localhost:11002"]
|
|
}
|
|
}
|
|
|
|
task notarise(type: JavaExec) {
|
|
classpath = sourceSets.main.runtimeClasspath
|
|
main = 'net.corda.notarydemo.NotaryDemoKt'
|
|
}
|
|
|