This repository has been archived by the owner on Oct 3, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
195 lines (168 loc) · 5.99 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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
/*
* Nuts consent cordapp
* Copyright (C) 2019 Nuts community
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
buildscript {
ext {
kotlinVersion = '1.2.71'
corda = '4.4'
cordaGradlePluginsVersion = '5.0.8'
}
repositories {
mavenLocal()
mavenCentral()
jcenter()
maven {
url "https://ci-artifactory.corda.r3cev.com/artifactory/corda-releases/"
}
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath "org.jetbrains.kotlin:kotlin-allopen:$kotlinVersion"
classpath "net.corda.plugins:cordapp:$cordaGradlePluginsVersion"
classpath "net.corda.plugins:cordformation:$cordaGradlePluginsVersion"
}
}
ext {
jacksonVersion = '2.9.8'
}
allprojects {
repositories {
mavenLocal()
mavenCentral()
jcenter()
maven { url "https://software.r3.com/artifactory/corda" }
maven { url 'https://repo.gradle.org/gradle/libs-releases' }
}
apply plugin: 'org.jetbrains.kotlin.jvm'
apply plugin: 'maven'
apply plugin: 'kotlin'
apply plugin: 'net.corda.plugins.cordapp'
apply plugin: 'jacoco'
apply plugin: 'signing'
version = "0.14.0"
group = "nl.nuts.consent.cordapp"
cordapp {
info.vendor = "Nuts community"
targetPlatformVersion = 6
}
configurations {
implementation {
exclude group: 'net.corda', module: 'corda-tools-cliutils'
exclude group: 'com.github.corda.crash', module: 'crash.shell'
exclude group: 'com.github.corda.crash', module: 'crash.connectors.ssh'
exclude group: 'com.github.bft-smart', module: 'library'
}
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions {
languageVersion = "1.2"
apiVersion = "1.2"
jvmTarget = "1.8"
javaParameters = true // Useful for reflection.
}
}
test {
jvmArgs "-javaagent:${project.rootDir}/lib/quasar-core-0.7.12_r3-jdk8.jar",
"-Dco.paralleluniverse.fibers.verifyInstrumentation=false"
}
task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives javadocJar, sourcesJar
}
signing {
required { gradle.taskGraph.hasTask("uploadArchives") }
if (project.hasProperty('ossrhUsername')) {
useGpgCmd()
}
sign configurations.archives
}
uploadArchives {
if (!project.hasProperty('ossrhUsername')) {
project.ext.ossrhUsername = "not_used"
project.ext.ossrhPassword = "not_used"
}
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(
userName: project.properties['ossrhUsername'],
password: project.properties['ossrhPassword'],
)
}
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(
userName: project.properties['ossrhUsername'],
password: project.properties['ossrhPassword'],
)
}
pom.project {
name "${project.name}"
description "Shared libs from the Nuts consent cordapp used in Nuts consent bridge"
url "https://github.com/nuts-foundation/nuts-consent-cordapp/"
packaging 'jar'
scm {
connection 'scm:git:https://github.com/nuts-foundation/nuts-consent-cordapp/'
developerConnection 'scm:git:https://github.com/nuts-foundation/nuts-consent-cordapp/'
url 'https://github.com/nuts-foundation/nuts-consent-cordapp/'
}
licenses {
license {
name 'GNU General Public License V3'
url 'https://www.gnu.org/licenses/gpl-3.0.html'
}
}
developers {
developer {
id 'wout'
name 'Wout Slakhorst'
email '[email protected]'
}
}
}
}
}
}
}
dependencies {
cordapp project(":flows")
}
task codeCoverageReport(type: JacocoReport) {
executionData fileTree(project.rootDir.absolutePath).include("**/build/jacoco/*.exec")
reports {
xml.enabled true
xml.destination file("${buildDir}/reports/jacoco/report.xml")
html.enabled true
html.destination file("${buildDir}/reports/jacoco/html")
csv.enabled false
}
subprojects.each {
sourceSets it.sourceSets.main
}
}
//change to dependsOn check when IT are added
codeCoverageReport.dependsOn {
subprojects*.test
}