-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
84 lines (79 loc) · 3.53 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
// Build plugins
plugins {
id 'java'
id 'idea'
id 'jacoco'
id 'org.springframework.boot' version '2.7.18'
id 'io.spring.dependency-management' version '1.1.6'
id 'com.github.node-gradle.node' version '7.0.2'
id 'io.gatling.gradle' version '3.11.5.2'
id 'com.gorylenko.gradle-git-properties' version '2.4.2'
}
// Java
java {
toolchain { languageVersion = JavaLanguageVersion.of(21) }
}
// Spring Boot
springBoot { buildInfo() }
bootBuildImage {
environment['BPE_DELIM_JAVA_TOOL_OPTIONS'] = ' '
environment['BPE_APPEND_JAVA_TOOL_OPTIONS'] = '--add-opens=java.base/java.lang=ALL-UNNAMED'
}
bootRun.jvmArgs '--add-opens=java.base/java.lang=ALL-UNNAMED'
gitProperties { failOnNoGitDirectory = false }
jar { enabled = false }
// Node/NPM
node {
version = '22.2.0'
download = true
nodeProjectDir = file('ui')
npmInstallCommand = "ci"
}
tasks.register('npmBuild', NpmTask) {
dependsOn npmInstall
npmCommand = ['run', 'build-prod']
}
processResources.dependsOn(npmBuild)
test.dependsOn(npm_test)
sourceSets { main.resources.srcDirs 'ui/dist' }
clean { delete 'ui/dist' }
// Tests
jacoco.toolVersion '0.8.12'
jacocoTestReport.reports.html.outputLocation.set(layout.buildDirectory.dir('reports/coverage/test'))
tasks.named('test', Test).configure {
jvmArgs '--add-opens=java.base/java.lang=ALL-UNNAMED'
finalizedBy jacocoTestReport
}
// Project dependencies
ext['h2.version'] = '2.2.224' // overriding managed dependency due to various CVEs in h2 1.x
repositories { mavenCentral() }
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-data-ldap'
implementation 'org.springframework.boot:spring-boot-starter-data-redis'
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.session:spring-session-data-redis'
implementation 'org.springframework.security.oauth:spring-security-oauth2:2.5.2.RELEASE'
implementation 'org.springframework.security.oauth.boot:spring-security-oauth2-autoconfigure:2.6.8'
implementation 'org.bouncycastle:bcpkix-jdk18on:1.80' // Overriding dependency of spring-security-oauth2-autoconfigure due to CVE-2020-15522
implementation 'com.unboundid:unboundid-ldapsdk'
implementation 'org.signal:embedded-redis:0.9.1'
implementation 'org.springdoc:springdoc-openapi-ui:1.8.0'
implementation 'com.opencsv:opencsv:5.10'
implementation 'io.github.resilience4j:resilience4j-bulkhead:2.3.0'
implementation 'io.github.resilience4j:resilience4j-spring-boot2:2.3.0'
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
runtimeOnly 'com.h2database:h2'
runtimeOnly 'com.oracle.database.jdbc:ojdbc11'
testImplementation 'org.junit.vintage:junit-vintage-engine'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.restdocs:spring-restdocs-mockmvc'
testImplementation 'org.springframework.security:spring-security-test'
}