-
Notifications
You must be signed in to change notification settings - Fork 157
Expand file tree
/
Copy pathbuild.gradle
More file actions
182 lines (158 loc) · 6.39 KB
/
build.gradle
File metadata and controls
182 lines (158 loc) · 6.39 KB
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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
import static org.gradle.api.JavaVersion.VERSION_17
buildscript {
Properties constants = new Properties()
file("$projectDir/../constants.properties").withInputStream { constants.load(it) }
ext {
corda_release_group = constants.getProperty("cordaReleaseGroup")
corda_core_release_group = constants.getProperty("cordaCoreReleaseGroup")
corda_release_version = constants.getProperty("cordaVersion")
corda_core_release_version = constants.getProperty("cordaCoreVersion")
corda_gradle_plugins_version = constants.getProperty("gradlePluginsVersion")
kotlin_version = constants.getProperty("kotlinVersion")
junit_version = constants.getProperty("junitVersion")
quasar_version = constants.getProperty("quasarVersion")
log4j_version = constants.getProperty("log4jVersion")
slf4j_version = constants.getProperty("slf4jVersion")
corda_platform_version = constants.getProperty("platformVersion").toInteger()
//account
accounts_release_group = 'com.r3.corda.lib.accounts'
accounts_release_version = '1.1'
//CI
confidential_id_release_group = "com.r3.corda.lib.ci"
confidential_id_release_version = "1.2"
testJvmArgs = ['--add-opens', 'java.base/java.time=ALL-UNNAMED', '--add-opens', 'java.base/java.io=ALL-UNNAMED',
'--add-opens', 'java.base/java.util=ALL-UNNAMED', '--add-opens', 'java.base/java.net=ALL-UNNAMED',
'--add-opens', 'java.base/java.nio=ALL-UNNAMED', '--add-opens', 'java.base/java.lang.invoke=ALL-UNNAMED',
'--add-opens', 'java.base/java.security.cert=ALL-UNNAMED', '--add-opens', 'java.base/java.security=ALL-UNNAMED',
'--add-opens', 'java.base/javax.net.ssl=ALL-UNNAMED', '--add-opens', 'java.base/java.lang=ALL-UNNAMED',
'--add-opens', 'java.base/java.util.concurrent=ALL-UNNAMED', '--add-opens', 'java.sql/java.sql=ALL-UNNAMED',]
}
repositories {
mavenLocal()
mavenCentral()
maven { url 'https://download.corda.net/maven/corda-releases' }
}
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"
}
}
allprojects {
apply from: "${rootProject.projectDir}/repositories.gradle"
apply plugin: 'java'
tasks.withType(Test) {
jvmArgs = rootProject.ext.testJvmArgs
}
repositories {
mavenLocal()
mavenCentral()
maven { url 'https://download.corda.net/maven/corda-dependencies' }
maven { url 'https://download.corda.net/maven/corda-releases' }
maven { url 'https://jitpack.io' }
//SDK lib
maven { url 'https://download.corda.net/maven/corda-lib' }
//Gradle Plugins
maven { url 'https://repo.gradle.org/gradle/libs-releases' }
}
java {
sourceCompatibility = VERSION_17
targetCompatibility = VERSION_17
}
compileJava {
options.compilerArgs << '-parameters'
}
jar {
// This makes the JAR's SHA-256 hash repeatable.
preserveFileTimestamps = false
reproducibleFileOrder = true
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
}
apply plugin: 'net.corda.plugins.cordapp'
apply plugin: 'net.corda.plugins.cordformation'
apply plugin: 'net.corda.plugins.quasar-utils'
sourceSets {
main {
resources {
srcDir rootProject.file("config/dev")
}
}
}
dependencies {
// Corda dependencies.
cordaProvided "$corda_core_release_group:corda-core:$corda_core_release_version"
cordaBootstrapper ("$corda_release_group:corda-node-api:$corda_release_version") {
exclude group: "ch.qos.logback", module: "logback-classic"
}
corda "$corda_release_group:corda:$corda_release_version"
// CorDapp dependencies.
cordapp project(":workflows")
cordapp project(":contracts")
cordaProvided "org.apache.logging.log4j:log4j-slf4j2-impl:${log4j_version}"
cordaProvided "org.apache.logging.log4j:log4j-web:${log4j_version}"
cordaProvided "org.slf4j:jul-to-slf4j:$slf4j_version"
cordaDriver "net.corda:corda-shell:$corda_release_version"
//accounts
cordapp "$accounts_release_group:accounts-contracts:$accounts_release_version"
cordapp "$confidential_id_release_group:ci-workflows:$confidential_id_release_version"
cordapp "$accounts_release_group:accounts-workflows:$accounts_release_version"
}
cordapp {
targetPlatformVersion corda_platform_version.toInteger()
}
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) {
nodeDefaults {
projectCordapp {
deploy = false
}
cordapp("$confidential_id_release_group:ci-workflows:$confidential_id_release_version")
cordapp("$accounts_release_group:accounts-contracts:$accounts_release_version")
cordapp("$accounts_release_group:accounts-workflows:$accounts_release_version")
cordapp project(":contracts")
cordapp project(":workflows")
runSchemaMigration = true
}
node {
name "O=Notary,L=London,C=GB"
notary = [validating : false]
p2pPort 10002
rpcSettings {
address("localhost:10003")
adminAddress("localhost:10043")
}
}
node {
name "O=Buyer,L=London,C=GB"
p2pPort 10005
rpcSettings {
address("localhost:10006")
adminAddress("localhost:10046")
}
rpcUsers = [[ user: "user1", "password": "test", "permissions": ["ALL"]]]
}
node {
name "O=Seller,L=New York,C=US"
p2pPort 10008
rpcSettings {
address("localhost:10009")
adminAddress("localhost:10049")
}
rpcUsers = [[ user: "user1", "password": "test", "permissions": ["ALL"]]]
}
node {
name "O=ShippingCo,L=New York,C=US"
p2pPort 10010
rpcSettings {
address("localhost:10011")
adminAddress("localhost:10052")
}
rpcUsers = [[ user: "user1", "password": "test", "permissions": ["ALL"]]]
}
}
task installQuasar(type: Copy) {
destinationDir rootProject.file("lib")
from(configurations.quasar) {
rename 'quasar-core(.*).jar', 'quasar.jar'
}
}