forked from roger-that-dev/yo-cordapp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
152 lines (134 loc) · 3.89 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
group 'com.github.roger3cev'
version '2'
buildscript {
ext.corda_version = '0.11-SNAPSHOT'
ext.corda_gradle_plugins_version = '0.10.3'
ext.kotlin_version = '1.1.1'
ext.junit_version = '4.12'
ext.quasar_version = '0.7.6'
repositories {
mavenLocal()
mavenCentral()
jcenter()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "net.corda.plugins:publish-utils:$corda_gradle_plugins_version"
classpath "net.corda.plugins:cordformation:$corda_gradle_plugins_version"
classpath "net.corda.plugins:quasar-utils:$corda_gradle_plugins_version"
}
}
apply plugin: 'kotlin'
apply plugin: 'idea'
apply plugin: 'net.corda.plugins.publish-utils'
apply plugin: 'net.corda.plugins.cordformation'
apply plugin: 'net.corda.plugins.quasar-utils'
apply plugin: 'maven-publish'
repositories {
mavenLocal()
mavenCentral()
jcenter()
maven { url 'https://dl.bintray.com/kotlin/exposed' }
maven { url 'https://jitpack.io' }
}
sourceSets {
main {
resources {
srcDir "config/dev"
}
}
test {
resources {
srcDir "config/test"
}
}
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions {
languageVersion = "1.1"
apiVersion = "1.1"
jvmTarget = "1.8"
javaParameters = true // Useful for reflection.
}
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
testCompile "org.jetbrains.kotlin:kotlin-test:$kotlin_version"
testCompile "junit:junit:$junit_version"
// Corda integration dependencies
compile "net.corda:core:$corda_version"
compile "net.corda:finance:$corda_version"
compile "net.corda:jackson:$corda_version"
compile "net.corda:node:$corda_version"
compile "net.corda:rpc:$corda_version"
compile "net.corda:webserver:$corda_version"
runtime "net.corda:corda:$corda_version"
runtime "net.corda:corda-webserver:$corda_version"
testCompile "net.corda:test-utils:$corda_version"
// GraphStream: For visualisation (required by TemplateClientRPC app)
compile "org.graphstream:gs-core:1.3"
compile("org.graphstream:gs-ui:1.3") {
exclude group: "bouncycastle"
}
// CorDapp dependencies
// Specify your cordapp's dependencies below, including dependent cordapps
}
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['build']) {
directory "./build/nodes"
networkMap "Controller"
node {
name "Controller"
nearestCity "London"
advertisedServices = ["corda.notary.validating"]
p2pPort 10002
rpcPort 10003
webPort 10004
cordapps = []
}
node {
name "NodeA"
nearestCity "London"
advertisedServices = []
p2pPort 10005
rpcPort 10006
webPort 10007
cordapps = []
rpcUsers = [[user: "user1", "password": "test", "permissions": []]]
}
node {
name "NodeB"
nearestCity "New York"
advertisedServices = []
p2pPort 10008
rpcPort 10009
webPort 10010
cordapps = []
rpcUsers = [[user: "user1", "password": "test", "permissions": []]]
}
}
idea {
module {
downloadJavadoc = true // defaults to false
downloadSources = true
}
}
publishing {
publications {
jarAndSources(MavenPublication) {
from components.java
artifactId 'cordapp-name-goes-here'
artifact sourceJar
artifact javadocJar
}
}
}
task runYoRPCNodeA(type: JavaExec) {
classpath = sourceSets.main.runtimeClasspath
main = 'net.corda.yo.ClientKt'
args 'localhost:10006'
}
task runYoRPCNodeB(type: JavaExec) {
classpath = sourceSets.main.runtimeClasspath
main = 'net.corda.yo.ClientKt'
args 'localhost:10009'
}