-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
297 lines (264 loc) · 10.4 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
plugins {
id("org.springframework.boot") version "2.7.1"
id("io.spring.dependency-management") version "1.0.12.RELEASE"
id("java")
id("com.github.jk1.dependency-license-report") version "2.1"
id("com.gorylenko.gradle-git-properties") version "2.4.1"
}
group = "org.codeforamerica"
version = "0.0.1-SNAPSHOT"
sourceCompatibility = "17"
configurations {
compileOnly {
extendsFrom annotationProcessor
}
developmentOnly
runtimeClasspath {
extendsFrom developmentOnly
}
jaxb
}
repositories {
mavenCentral()
maven { url "https://repo.spring.io/milestone" }
}
task genJaxbFilenet {
ext.sourcesDir = "${buildDir}/generated-sources/jaxbFilenet"
ext.classesDir = "${buildDir}/classes/jaxb"
ext.schema = "src/main/resources/FileNetService.wsdl"
outputs.dir classesDir
doLast() {
project.ant {
taskdef name: "xjc", classname: "com.sun.tools.xjc.XJCTask",
classpath: configurations.jaxb.asPath
mkdir(dir: sourcesDir)
mkdir(dir: classesDir)
xjc(destdir: sourcesDir, schema: schema,
package: "org.codeforamerica.shiba.filenetwsdl") {
arg(value: "-wsdl")
arg(value: "-extension")
produces(dir: sourcesDir, includes: "**/*.java")
}
javac(destdir: classesDir, source: 1.8, target: 1.8, debug: true,
debugLevel: "lines,vars,source",
includeantruntime: false,
classpath: configurations.jaxb.asPath) {
src(path: sourcesDir)
include(name: "**/*.java")
include(name: "*.java")
}
copy(todir: classesDir) {
fileset(dir: sourcesDir, erroronmissingdir: false) {
exclude(name: "**/*.java")
}
}
}
}
}
dependencyManagement {
imports {
mavenBom("org.springframework.session:spring-session-bom:2021.2.0")
}
}
dependencies {
modules {
module("javax.activation:activation") {
replacedBy("jakarta.activation:jakarta.activation-api", "Use jakarta instead of javax")
}
module("org.apache.commons:commons-email") {
replacedBy("com.sun.mail:jakarta.mail", "Use jakarta instead of apache")
}
}
implementation(files(genJaxbFilenet.classesDir).builtBy(genJaxbFilenet))
jaxb(
'org.glassfish.jaxb:jaxb-runtime',
'org.glassfish.jaxb:jaxb-xjc',
'org.glassfish.jaxb:jaxb-jxc'
)
compileOnly("org.projectlombok:lombok")
developmentOnly("org.springframework.boot:spring-boot-devtools")
annotationProcessor("org.projectlombok:lombok")
annotationProcessor("org.springframework.boot:spring-boot-configuration-processor")
implementation("org.springframework.mobile:spring-mobile-starter:2.0.0.M3")
implementation("org.springframework.session:spring-session-jdbc")
implementation("io.sentry:sentry-spring-boot-starter:6.1.4")
implementation("org.springframework.boot:spring-boot-starter-thymeleaf")
implementation("org.apache.logging.log4j:log4j-api:2.18.0")
implementation("org.apache.logging.log4j:log4j-to-slf4j:2.18.0")
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("org.springframework.boot:spring-boot-starter-web-services") {
exclude(group: "org.springframework.boot", module: "spring-boot-starter-tomcat")
}
implementation("com.azure:azure-storage-blob:12.17.1")
implementation("com.azure:azure-storage-blob:12.17.1")
implementation("org.postgresql:postgresql")
implementation("org.glassfish.jaxb:jaxb-runtime")
implementation("org.apache.pdfbox:pdfbox:2.0.26")
implementation("org.apache.commons:commons-lang3")
implementation("org.apache.commons:commons-text:1.9")
implementation("org.jetbrains:annotations:23.0.0")
implementation("commons-validator:commons-validator:1.7")
implementation("org.springframework.boot:spring-boot-starter-data-jdbc")
implementation("org.apache.httpcomponents:httpclient")
implementation("io.sentry:sentry-logback:6.1.4")
implementation("org.springframework.boot:spring-boot-starter-security")
implementation("org.springframework.boot:spring-boot-starter-oauth2-client")
implementation("com.google.crypto.tink:tink:1.6.1")
implementation("org.flywaydb:flyway-core:8.5.13")
implementation("org.springframework.boot:spring-boot-starter-webflux")
implementation("com.mixpanel:mixpanel-java:1.5.0")
implementation("org.springframework.boot:spring-boot-starter-validation")
implementation("com.sun.activation:jakarta.activation")
implementation("org.apache.commons:commons-email:1.5")
implementation("org.springframework:spring-aspects")
implementation("com.google.code.findbugs:jsr305:3.0.2")
implementation("org.springframework.retry:spring-retry")
implementation("ch.qos.logback.contrib:logback-json-classic:0.1.5")
implementation("ch.qos.logback.contrib:logback-jackson:0.1.5")
implementation("ch.qos.logback:logback-core:1.2.11")
implementation("ch.qos.logback:logback-classic:1.2.0")
implementation("net.logstash.logback:logstash-logback-encoder:7.2")
implementation("net.javacrumbs.shedlock:shedlock-spring:4.38.0")
implementation("net.javacrumbs.shedlock:shedlock-provider-jdbc-template:4.38.0")
implementation("org.apache.chemistry.opencmis:chemistry-opencmis-client-api:1.1.0")
implementation("org.apache.chemistry.opencmis:chemistry-opencmis-client-impl:1.1.0")
implementation("net.coobird:thumbnailator:0.4.17")
implementation("org.springframework.ws:spring-ws-core")
jaxb(
"org.glassfish.jaxb:jaxb-runtime",
"org.glassfish.jaxb:jaxb-xjc",
"org.glassfish.jaxb:jaxb-jxc"
)
testCompileOnly("org.projectlombok:lombok")
testAnnotationProcessor("org.projectlombok:lombok")
testImplementation("org.seleniumhq.selenium:selenium-java")
testImplementation("de.redsix:pdfcompare:1.1.61")
testImplementation("org.springframework.boot:spring-boot-starter-test") {
exclude group: "org.junit.vintage", module: "junit-vintage-engine"
exclude group: "com.vaadin.external.google", module: "android-json"
}
testImplementation("com.h2database:h2")
testImplementation("org.awaitility:awaitility")
testImplementation("com.github.tomakehurst:wiremock-standalone:2.27.2")
testImplementation("org.mockito:mockito-inline")
testImplementation("io.github.bonigarcia:webdrivermanager:5.2.1")
testImplementation("org.springframework.ws:spring-ws-test")
testImplementation("org.springframework.security:spring-security-test")
testImplementation("io.percy:percy-java-selenium:1.0.0")
testImplementation("com.deque.html.axe-core:selenium:4.4.1")
testImplementation("org.jsoup:jsoup:1.15.2")
}
compileJava {
dependsOn(generateGitProperties)
dependsOn(genJaxbFilenet)
inputs.files(processResources)
}
def unitTest = tasks.register("unitTest", Test) {
Test task ->
task.useJUnitPlatform {
JUnitPlatformOptions options ->
options.excludeTags("db", "documentUploadJourney", "laterDocsJourney", "fullFlowJourney", "minimumFlowJourney", "framework", "pdf", "ccap", "validation", "a11y")
}
}
def documentUploadJourneyTest = tasks.register("documentUploadJourneyTest", Test) {
Test task ->
task.useJUnitPlatform {
JUnitPlatformOptions options ->
options.includeTags("documentUploadJourney")
}
}
def fullFlowJourneyTest = tasks.register("fullFlowJourneyTest", Test) {
Test task ->
task.useJUnitPlatform {
JUnitPlatformOptions options ->
options.includeTags("fullFlowJourney")
}
}
def laterDocsJourneyTest = tasks.register("laterDocsJourneyTest", Test) {
Test task ->
task.useJUnitPlatform {
JUnitPlatformOptions options ->
options.includeTags("laterDocsJourney")
}
}
def minimumFlowJourneyTest = tasks.register("minimumFlowJourneyTest", Test) {
Test task ->
task.useJUnitPlatform {
JUnitPlatformOptions options ->
options.includeTags("minimumFlowJourney")
}
}
def frameworkTest = tasks.register("frameworkTest", Test) {
Test task ->
task.useJUnitPlatform {
JUnitPlatformOptions options ->
options.includeTags("framework")
}
}
def pdfTest = tasks.register("pdfTest", Test) {
Test task ->
task.useJUnitPlatform {
JUnitPlatformOptions options ->
options.includeTags("pdf")
}
}
def dbTest = tasks.register("dbTest", Test) {
Test task ->
task.useJUnitPlatform {
JUnitPlatformOptions options ->
options.includeTags("db")
}
}
def ccapTest = tasks.register("ccapTest", Test) {
Test task ->
task.useJUnitPlatform {
JUnitPlatformOptions options ->
options.includeTags("ccap")
}
}
def validationTest = tasks.register("validationTest", Test) {
Test task ->
task.useJUnitPlatform {
JUnitPlatformOptions options ->
options.includeTags("validation")
}
}
def axeAccessibilityTest = tasks.register("accessibilityTest", Test) {
Test task ->
task.useJUnitPlatform {
JUnitPlatformOptions options ->
options.includeTags("a11y")
}
}
test {
useJUnitPlatform {
JUnitPlatformOptions options ->
options.excludeTags("a11y")
}
dependsOn(checkLicense)
}
tasks.withType(Test).configureEach {
Test task ->
task.doFirst {
file(".env.test").readLines().each() {
def (key, value) = it.split("=", 2)
environment(key, value)
}
}
task.maxParallelForks(Runtime.runtime.availableProcessors().intdiv(2) ?: 1)
task.testLogging {
exceptionFormat = "full"
events = ["failed", "skipped"]
showStackTraces = true
showCauses = true
showExceptions = true
// uncomment the following line to print stdout and stderr for every test
// showStandardStreams = true
}
}
licenseReport {
allowedLicensesFile = new File("$projectDir/allowed-licenses.json")
}
jar {
enabled = false
}