-
Notifications
You must be signed in to change notification settings - Fork 66
/
Copy pathbuild.gradle
213 lines (180 loc) · 7.59 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
/*
* Copyright 2019 EPAM Systems
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
plugins {
id 'io.spring.dependency-management' version '1.1.7'
id 'java'
id 'java-library'
id 'org.owasp.dependencycheck' version '11.1.1'
id 'org.springframework.boot' version "${springBootVersion}"
id "com.epam.drill.integration.cicd" version "0.1.6"
}
import org.owasp.dependencycheck.reporting.ReportGenerator
apply from: 'project-properties.gradle'
apply from: "$scriptsUrl/build-commons.gradle"
apply from: "$scriptsUrl/build-info.gradle"
apply from: "$scriptsUrl/release-service.gradle"
apply from: "$scriptsUrl/signing.gradle"
apply from: "$scriptsUrl/copy-database-scripts.gradle"
//replaced with drill4j
//apply from: "$scriptsUrl/build-quality.gradle"
//apply from: "$scriptsUrl/jacoco.gradle"
//apply plugin: 'jacoco'
project.hasProperty('sealightsSession') && sealightsSession?.trim() ? apply(from: 'sealights.gradle') : println('No sealights session')
repositories {
if (!releaseMode) {
maven { url 'https://jitpack.io' }
}
mavenCentral { url "https://repo1.maven.org/maven2" }
}
java {
targetCompatibility = JavaVersion.VERSION_21
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
ext['spring-boot.version'] = "${springBootVersion}"
dependencyManagement {
imports {
mavenBom(releaseMode ? 'com.epam.reportportal:commons-bom:' + '5.13.1' : 'com.epam.reportportal:commons-bom:5.13.1')
mavenBom('io.zonky.test.postgres:embedded-postgres-binaries-bom:16.2.0')
}
}
println("Release mode: $releaseMode")
dependencies {
if (releaseMode) {
println("Using release dependencies")
implementation 'com.epam.reportportal:commons-dao'
implementation 'com.epam.reportportal:commons'
implementation 'com.epam.reportportal:plugin-api'
} else {
println("Using snapshot dependencies")
implementation 'com.github.reportportal:commons-dao:0f555c9'
implementation 'com.github.reportportal:commons:c7041ee'
implementation 'com.github.reportportal:plugin-api:8874441'
}
implementation 'jakarta.servlet:jakarta.servlet-api:6.1.0'
implementation 'org.springframework.boot:spring-boot-starter-aop'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-quartz'
implementation 'org.springframework.boot:spring-boot-starter-freemarker'
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-amqp'
implementation 'org.springframework.boot:spring-boot-starter-batch'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-oauth2-client'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.security:spring-security-core'
implementation 'org.springframework.security:spring-security-oauth2-core'
implementation 'org.springframework.security:spring-security-oauth2-client'
implementation 'org.springframework.security:spring-security-oauth2-resource-server'
implementation 'org.springframework.security:spring-security-web'
implementation 'org.springframework:spring-context-support'
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.8.3'
implementation 'com.opencsv:opencsv:5.10'
implementation "org.jooq:jooq:${jooqVersion}"
// Optional for spring-boot-starter-amqp
implementation "com.rabbitmq:http-client:5.3.0"
// check authentication error response format for versions higher than 6.21.3
implementation('net.sf.jasperreports:jasperreports:6.21.3') { //TODO: consider upgrade to 7.0.1+
exclude group: 'com.fasterxml.jackson.dataformat', module: 'jackson-dataformat-xml'
}
implementation 'jakarta.inject:jakarta.inject-api:2.0.1'
implementation 'com.sun.mail:jakarta.mail:2.0.1'
implementation 'xerces:xercesImpl:2.12.2'
implementation 'com.itextpdf:itextpdf:5.5.13.4'
implementation 'org.bouncycastle:bcprov-jdk18on:1.80'
implementation 'com.google.api-client:google-api-client:2.6.0'
implementation('commons-validator:commons-validator:1.9.0') {
exclude group: 'commons-beanutils', module: 'commons-beanutils'
}
implementation 'org.springframework.security:spring-security-acl'
implementation 'com.github.ben-manes.caffeine:caffeine'
// JasperReport's export to XLS uses Apache POI
implementation 'org.apache.poi:poi:4.1.2' // TODO: consider upgrade to 5.4.0+
implementation "org.apache.jclouds.api:filesystem:${jcloudsVersion}"
implementation 'org.apache.commons:commons-compress'
implementation "org.hibernate.validator:hibernate-validator:${hibernateValidatorVersion}"
// add lombok support
compileOnly "org.projectlombok:lombok:${lombokVersion}"
annotationProcessor "org.projectlombok:lombok:${lombokVersion}"
testCompileOnly "org.projectlombok:lombok:${lombokVersion}"
testAnnotationProcessor "org.projectlombok:lombok:${lombokVersion}"
// Tests
testImplementation 'org.springframework.boot:spring-boot-starter-test'
implementation 'org.springframework:spring-web'
implementation 'org.springframework:spring-test'
testImplementation 'org.flywaydb.flyway-test-extensions:flyway-spring-test:10.0.0'
testImplementation 'io.jsonwebtoken:jjwt-impl:0.12.5'
testImplementation 'io.jsonwebtoken:jjwt-jackson:0.12.5'
}
processResources {
dependsOn(gitInfo)
filesMatching('application.properties') {
expand(project.properties)
}
}
tasks.withType(JavaCompile).configureEach {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
options.encoding = "UTF-8"
options.compilerArgs << "-parameters"
options.debug = true
options.debugOptions.debugLevel = "source,lines,vars"
}
dependencyCheck {
formats = [ReportGenerator.Format.HTML, ReportGenerator.Format.XML]
// cveValidForHours = 1
}
bootJar {
duplicatesStrategy = duplicatesStrategy.EXCLUDE
project.hasProperty('gcp') ? getArchiveFileName().set('app.jar') : archiveClassifier.set('' +
'exec')
}
jar.enabled(true)
jar.archiveClassifier.set('')
test {
dependsOn(copyTestDatabaseScripts)
useJUnitPlatform()
maxParallelForks = 1
testLogging {
events = ['failed']
exceptionFormat = 'short'
}
reports {
junitXml.required = true
}
}
publish.dependsOn build
publish.mustRunAfter build
checkCommitNeeded.dependsOn removeScripts
//replaced with drill4j
//build.dependsOn jacocoTestReport
drill {
groupId = "report-portal"
appId = "service-api"
packagePrefixes = ["com/epam/ta/reportportal"]
enableTestAgent {
enabled = System.getenv("DRILL_AGENT_ENABLED") == "true" ?: false
version = "0.23.3"
}
enableAppAgent {
enabled = System.getenv("DRILL_AGENT_ENABLED") == "true" ?: false
version = "0.9.4"
}
}
tasks.preTagCommit.enabled = false
tasks.updateVersion.enabled = false
tasks.commitNewVersion.enabled = false