This repository has been archived by the owner on Apr 10, 2024. It is now read-only.
forked from corda/bootcamp-cordapp
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
executable file
·161 lines (145 loc) · 4.9 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
153
154
155
156
157
158
159
160
161
buildscript {
ext.corda_release_group = 'net.corda'
ext.corda_release_version = '4.1'
ext.corda_gradle_plugins_version = '4.0.43'
ext.junit_version = '4.12'
ext.quasar_version = '0.7.10'
ext.web3j_corda_version = '0.2.7'
repositories {
mavenCentral()
jcenter()
maven { url 'https://jitpack.io' }
maven { url 'https://ci-artifactory.corda.r3cev.com/artifactory/corda-releases' }
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath "net.corda.plugins:cordapp:$corda_gradle_plugins_version"
classpath "net.corda.plugins:cordformation:$corda_gradle_plugins_version"
classpath "net.corda.plugins:quasar-utils:$corda_gradle_plugins_version"
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.61'
}
}
repositories {
jcenter()
mavenCentral()
maven { url 'https://jitpack.io' }
maven { url 'https://ci-artifactory.corda.r3cev.com/artifactory/corda-releases' }
maven { url 'https://repo.gradle.org/gradle/libs-releases-local/' }
}
apply plugin: 'java'
apply plugin: 'org.jetbrains.kotlin.jvm'
apply plugin: 'net.corda.plugins.cordapp'
apply plugin: 'net.corda.plugins.cordformation'
apply plugin: 'net.corda.plugins.quasar-utils'
dependencies {
cordaCompile "$corda_release_group:corda-core:$corda_release_version"
cordaCompile "$corda_release_group:corda-jackson:$corda_release_version"
cordaCompile "$corda_release_group:corda-rpc:$corda_release_version"
cordaCompile "$corda_release_group:corda-node-api:$corda_release_version"
cordaRuntime "$corda_release_group:corda:$corda_release_version"
testCompileClasspath fileTree(dir: 'lib/dependencies', include: '*.jar')
testCompile "$corda_release_group:corda-node-driver:$corda_release_version"
testCompile "$corda_release_group:corda-test-utils:$corda_release_version"
implementation "org.web3j.corda:web3j-corda-core:$web3j_corda_version"
implementation "org.web3j.corda:web3j-corda-console:$web3j_corda_version"
testImplementation "org.web3j.corda:web3j-corda-test:$web3j_corda_version"
testImplementation "org.junit.jupiter:junit-jupiter-api:5.4.2"
testImplementation "org.testcontainers:testcontainers:1.12.3"
testImplementation "io.swagger.core.v3:swagger-core:2.0.9"
testImplementation "com.samskivert:jmustache:1.14"
testImplementation "org.gradle:gradle-tooling-api:5.6.4"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:5.4.2"
testRuntimeOnly "org.junit.vintage:junit-vintage-engine:5.4.2"
}
test {
useJUnitPlatform()
systemProperties = [
'junit.jupiter.testinstance.lifecycle.default' : 'per_class'
]
}
tasks.withType(JavaCompile) {
options.compilerArgs << "-parameters" // Required for shell commands.
}
sourceSets {
main{
java {
srcDir 'src/main/java'
java.outputDir = file('bin/main')
}
}
test{
java {
srcDir 'src/test/java'
java.outputDir = file('bin/test')
}
}
}
cordapp {
targetPlatformVersion 4
minimumPlatformVersion 4
contract {
name "Bootcamp Contracts"
vendor "R3"
licence "A liberal, open source licence"
versionId 1
}
workflow {
name "Bootcamp Flows"
vendor "R3"
licence "A really expensive proprietary licence"
versionId 1
}
signing {
enabled = false
}
}
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) {
nodeDefaults {
projectCordapp { deploy = true }
}
node {
name "O=Notary,L=London,C=GB"
notary = [validating: false]
p2pPort 10000
cordapps = []
rpcSettings {
address("localhost:10001")
adminAddress("localhost:10002")
}
}
node {
name "O=PartyA,L=London,C=GB"
p2pPort 10003
rpcSettings {
address("localhost:10004")
adminAddress("localhost:10005")
}
rpcUsers = [[user: "user1", password: "test", permissions: ["ALL"]]]
}
node {
name "O=PartyB,L=New York,C=US"
p2pPort 10006
rpcSettings {
address("localhost:10007")
adminAddress("localhost:10008")
}
rpcUsers = [[user: "user1", password: "test", permissions: ["ALL"]]]
}
node {
name "O=PartyC,L=Lagos,C=NG"
p2pPort 10009
rpcSettings {
address("localhost:10010")
adminAddress("localhost:10011")
}
rpcUsers = [[user: "user1", password: "test", permissions: ["ALL"]]]
}
}
task generateCorDappWrappers(type: JavaExec, group: 'web3j') {
classpath = sourceSets.main.runtimeClasspath
main = 'org.web3j.corda.console.CordaCommandMain'
args 'generate',
'--package-name', 'bootcamp',
'--cordapps-dir', projectDir,
'--output-dir', "$projectDir"
}