-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
320 lines (259 loc) · 11.3 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
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath 'org.owasp:dependency-check-gradle:5.3.2.1'
}
}
plugins {
id 'base'
id 'io.spring.dependency-management' version '1.0.9.RELEASE'
id 'org.springframework.boot' version '2.7.1' apply false
id "com.github.node-gradle.node" version "3.3.0" apply false
id "com.webcohesion.enunciate" version "2.15.0" apply false
id "io.freefair.lombok" version "5.3.3.3" apply false
id 'com.github.jk1.dependency-license-report' version '1.16'
id "com.github.hierynomus.license-report" version "0.15.0"
}
apply from: "$rootDir/gradle/Release.gradle"
apply from: "$rootDir/gradle/tools.gradle"
apply plugin: "com.github.hierynomus.license-report"
ext {
dockerImages = [
main : 'src/main/docker/Dockerfile'
//openjdk : 'src/main/docker/openjdk/Dockerfile',
]
}
def javaProjects = subprojects.findAll { project -> project.subprojects.empty }
licenseReport {
// prepare allowed licenses
// for (nl.javadude.gradle.plugins.license.LicenseMetadata a in downloadLicenses.allowedLicenses) {
// println()
//
// def names = downloadLicenses.aliases.get(a)
// for (name in names) {
// if (name instanceof String)
// println("{\"moduleLicense\": \"" + name + "\"},")
// else if (name instanceof nl.javadude.gradle.plugins.license.LicenseMetadata)
// println("{\"moduleLicense\": \"" + name.licenseName + "\"},")
// }
// }
excludeGroups = ['javax.servlet.*']
excludes = ['asm:asm', 'com.sun.codemodel:codemodel-project', 'net.jcip:jcip-annotations', 'com.fasterxml.jackson:jackson-bom']
configurations = ['runtimeClasspath']
allowedLicensesFile = new File("$rootDir/allowed-lic.json")
}
checkLicense {
outputs.upToDateWhen { false }
}
configure(javaProjects) {
apply plugin: 'java-library'
apply plugin: 'java'
apply plugin: 'maven-publish'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'org.owasp.dependencycheck'
apply from: "$rootDir/gradle/DockerSupport.gradle"
repositories {
mavenCentral()
// for dependency: Gson Extras 2.8.5
maven {
url "https://artifactory.cronapp.io/public-release/"
}
}
dependencyManagement {
imports {
// Keeps netty-related dependencies consistent
mavenBom 'io.netty:netty-bom:4.1.68.Final'
}
}
configurations.all {
resolutionStrategy {
// Disable this line on case of version conflict and then run :dependency task OR execute build with --scan option
failOnVersionConflict()
}
// same api defined in javax.annotation-api-*
exclude group: 'jakarta.annotation', module: 'jakarta.annotation-api' // GNU license
}
dependencyCheck {
if (project.hasProperty("failOnHighCVSS") && project.getProperty("failOnHighCVSS") == 'true') {
failBuildOnCVSS = 7
}
suppressionFile = file("$rootDir/dependency-check-suppression-file.xml")
analyzers {
assemblyEnabled = false
}
}
compileJava.options.encoding = 'UTF-8'
sourceCompatibility = 11
targetCompatibility = 11
// Defines versions of dependencies to be used by subprojects
// https://github.com/spring-gradle-plugins/dependency-management-plugin#dependency-management-dsl
dependencyManagement {
imports {
mavenBom 'com.fasterxml.jackson:jackson-bom:2.13.5'
}
dependencies {
// Enunciate annotations
dependency 'com.webcohesion.enunciate:enunciate-core-annotations:2.12.1'
// ---- Timebase dependencies
dependency "org.finos.timebase-ce:timebase-client:${timebaseVersion}"
dependency "org.finos.timebase-ce:timebase-api:${timebaseVersion}"
dependency "org.finos.timebase-ce:timebase-pub:${timebaseVersion}"
dependency "org.finos.timebase-ce:timebase-aerondirect:${timebaseVersion}"
dependency "com.epam.deltix:timebase-lang:${commonsVersion}"
dependency "com.epam.deltix:timebase-util:${commonsVersion}"
dependency "com.epam.deltix:timebase-messages:${commonsVersion}"
dependency "com.epam.deltix:timebase-collections:${commonsVersion}"
dependency 'com.epam.deltix:dfp:0.12.5'
dependency "com.epam.deltix:containers:3.1.2"
dependency 'com.epam.deltix:hd-date-time:0.2.11'
dependency 'com.epam.deltix:thread-affinity:1.0.4'
dependencySet(group: 'com.epam.deltix', version: '3.0.2') {
entry 'gflog-api'
entry 'gflog-core'
entry 'gflog-jul'
entry 'gflog-dcl'
entry 'gflog-slf4j'
}
dependency 'org.modelmapper:modelmapper:2.3.2'
dependency 'com.epam.deltix:orderbook-core:1.0.18'
// ----
//dependency 'deltix:deltix-spring-api-keys:0.1.4'
// spring boot tests
dependency 'org.junit.jupiter:junit-jupiter-api:5.8.2'
dependency 'com.nimbusds:oauth2-oidc-sdk:9.43.4'
dependency 'com.nimbusds:nimbus-jose-jwt:9.37.3'
dependency 'org.hdrhistogram:HdrHistogram:2.1.10'
dependency 'org.slf4j:slf4j-api:1.7.25'
// resolving conflicts
dependency 'com.squareup.okhttp3:okhttp:3.3.1'
dependency 'net.minidev:json-smart:2.4.11'
dependency 'commons-logging:commons-logging:1.2'
dependency 'commons-cli:commons-cli:1.4'
dependency 'commons-codec:commons-codec:1.13'
dependency 'commons-io:commons-io:2.7'
dependency 'com.google.guava:guava:32.0.1-jre'
dependency 'com.google.code.gson:gson:2.8.9'
dependency 'com.google.code.findbugs:jsr305:3.0.2'
dependency 'com.google.code.findbugs:annotations:3.0.1'
dependency 'org.apache.commons:commons-compress:1.26.0'
dependency 'org.apache.commons:commons-lang3:3.7'
dependency 'org.apache.commons:commons-math3:3.6'
dependency 'org.apache.commons:commons-text:1.10.0'
dependency 'com.fasterxml.jackson:jackson-bom:2.13.5'
dependencySet(group: 'com.fasterxml.jackson.core', version: '2.13.5') {
entry 'jackson-databind'
entry 'jackson-core'
entry 'jackson-annotations'
entry 'jackson-module-parameter-names'
}
dependency 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.13.5'
dependency 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.13.5'
dependency 'io.micrometer:micrometer-registry-prometheus:1.9.1'
dependency 'io.micrometer:micrometer-core:1.9.1'
dependencySet(group: 'org.springframework', version: '5.3.28') {
entry 'spring-beans'
entry 'spring-jcl'
entry 'spring-core'
entry 'spring-context'
entry 'spring-messaging'
entry 'spring-aop'
entry 'spring-aop'
entry 'spring-expression'
entry 'spring-web'
entry 'spring-test'
entry 'spring-webmvc'
entry 'spring-websocket'
}
dependencySet(group: 'org.springframework.boot', version: '2.7.13') {
entry 'spring-boot'
entry 'spring-boot-autoconfigure'
entry 'spring-boot-configuration-processor'
entry 'spring-boot-starter'
entry 'spring-boot-starter-json'
entry 'spring-boot-starter-web'
entry 'spring-boot-starter-websocket'
entry 'spring-boot-starter-actuator'
entry 'spring-boot-starter-validation'
entry 'spring-boot-starter-test'
}
dependencySet(group: 'org.apache.tomcat.embed', version: '9.0.83') {
entry 'tomcat-embed-core'
entry 'tomcat-embed-websocket'
entry 'tomcat-embed-el'
}
dependencySet(group: 'org.springframework.security', version: '5.7.10') {
entry 'spring-security-web'
entry 'spring-security-messaging'
entry 'spring-security-core'
entry 'spring-security-config'
entry 'spring-security-oauth2'
entry 'spring-security-oauth2-client'
entry 'spring-security-oauth2-resource-server'
entry 'spring-security-oauth2-jose'
}
dependency 'org.springframework.security.oauth:spring-security-oauth2:2.5.2.RELEASE'
dependency 'org.springframework.security:spring-security-jwt:1.1.0.RELEASE'
dependency 'org.testcontainers:testcontainers:1.16.2'
dependency 'org.testcontainers:junit-jupiter:1.16.2'
dependency 'javax.annotation:javax.annotation-api:1.3.2'
dependency 'org.reflections:reflections:0.9.11'
dependency 'org.asynchttpclient:async-http-client:2.10.4'
dependency 'junit:junit:4.13.1'
dependency 'io.reactivex.rxjava2:rxjava:2.1.14'
dependency 'net.java.dev.jna:jna:5.8.0'
dependency 'org.yaml:snakeyaml:2.0'
dependency 'org.apache.bcel:bcel:6.6.0'
dependencySet(group: 'io.netty', version: '4.1.94.Final') {
entry 'netty-codec'
entry 'netty-codec-http'
entry 'netty-handler'
entry 'netty-buffer'
entry 'netty-common'
entry 'netty-transport'
entry 'netty-resolver'
entry 'netty-codec-dns'
entry 'netty-codec-socks'
entry 'netty-handler-proxy'
entry 'netty-resolver-dns'
entry 'netty-transport-native-epoll'
entry 'netty-transport-native-kqueue'
entry 'netty-transport-native-unix-common'
}
}
}
task sourcesJar(type: Jar, dependsOn: classes) {
archiveClassifier.set('sources')
archiveBaseName.set(archivesBaseName)
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
archiveClassifier.set('javadoc')
archiveBaseName.set(archivesBaseName)
from javadoc.destinationDir
}
artifacts {
archives sourcesJar
archives javadocJar
}
test {
ignoreFailures Boolean.getBoolean("test.ignoreFailures")
reports.junitXml.enabled = true
doLast {
copy {
from reports.junitXml.getDestination() include {"*.xml"}
into file("$rootDir/build/reports/tests/xml")
}
}
}
}
def testTasks = javaProjects*.test
task generateTestReport(type: TestReport) {
reportOn testTasks
description "Executes tests for all Java projects and generates merged test report"
destinationDir = file("$rootDir/build/reports/tests/html/all_reports_merged") // TODO: Pick better name for merged report
}
build.dependsOn generateTestReport