-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
148 lines (123 loc) · 4.11 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
plugins {
id 'java'
id 'java-library'
id 'application'
id 'com.palantir.docker' version '0.26.0' apply false
id "org.owasp.dependencycheck" version "8.1.0"
}
apply plugin: 'com.palantir.docker'
group 'com.exactprosystems.fix.reader'
version '1.0-SNAPSHOT'
ext.excludeSailfish = { rcd ->
rcd.excludeModule("com.exactpro.sf", "sailfish-core")
rcd.excludeModule("com.exactpro.sf", "sailfish-common")
rcd.excludeModule("com.exactpro.sf", "sailfish-rest-api-client")
rcd.excludeModule("com.exactpro.sf", "service-http")
}
sourceCompatibility = 11
targetCompatibility = 11
repositories {
maven {
name 'Sonatype_snapshots'
url 'https://s01.oss.sonatype.org/content/repositories/snapshots/'
content {
excludeSailfish(it)
}
}
// ignoreGradleMetadataRedirection is used for sonatype because
// Sailfish dependencies have constrains that interfere with our BOM
// so we exclude Gradle metadata for this repositories.
// We've checked these versions - they are compatible and safe to use
maven {
name 'Sonatype_snapshots'
url 'https://s01.oss.sonatype.org/content/repositories/snapshots/'
metadataSources {
mavenPom()
artifact()
ignoreGradleMetadataRedirection()
}
}
maven {
name 'Sonatype_releases'
url 'https://s01.oss.sonatype.org/content/repositories/releases/'
content {
excludeSailfish(it)
}
}
maven {
name 'Sonatype_releases'
url 'https://s01.oss.sonatype.org/content/repositories/releases/'
metadataSources {
mavenPom()
artifact()
ignoreGradleMetadataRedirection()
}
}
mavenCentral()
mavenLocal()
}
dependencies {
api platform('com.exactpro.th2:bom:4.2.0')
implementation 'io.netty:netty-buffer'
implementation 'commons-collections:commons-collections:3.2.2'
implementation 'org.tukaani:xz:1.8'
implementation 'io.prometheus:simpleclient:0.9.0'
implementation 'org.apache.commons:commons-compress:1.21'
implementation 'com.exactpro.th2:common:3.44.1'
implementation 'org.codehaus.plexus:plexus-utils:3.0.16'
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.12.3'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.13.0'
implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:2.13.0'
implementation group: 'io.grpc', name: 'grpc-protobuf', version: '1.19.0'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
// https://mvnrepository.com/artifact/org.mockito/mockito-core
testImplementation group: 'org.mockito', name: 'mockito-core', version: '2.1.0'
// https://mvnrepository.com/artifact/org.cassandraunit/cassandra-unit
testImplementation group: 'org.cassandraunit', name: 'cassandra-unit', version: '4.3.1.0'
}
test {
useJUnitPlatform()
}
jar {
zip64=true
manifest {
attributes(
'Created-By': "${System.getProperty('java.version')} (${System.getProperty('java.vendor')})",
'Specification-Title': '',
'Specification-Vendor': 'Exactpro Systems LLC',
'Implementation-Title': project.archivesBaseName,
'Implementation-Vendor': 'Exactpro Systems LLC',
'Implementation-Vendor-Id': 'com.exactpro',
'Implementation-Version': project.version
)
}
}
application {
mainClassName 'com.exactprosystems.fix.reader.pcapreader.starter.PcapReaderMain'
}
applicationName = 'service'
distTar {
archiveName "${applicationName}.tar"
}
dockerPrepare {
dependsOn distTar
}
docker {
copySpec.from(tarTree("$buildDir/distributions/${applicationName}.tar"))
}
test {
useJUnitPlatform()
}
dependencyLocking {
lockAllConfigurations()
}
dependencyCheck {
formats=['SARIF', 'JSON', 'HTML']
failBuildOnCVSS=5
analyzers {
assemblyEnabled = false
nugetconfEnabled = false
nodeEnabled = false
}
}