-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
188 lines (164 loc) · 6.8 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
plugins {
id "java"
id "maven-publish"
id "idea"
id "eclipse"
id "com.gorylenko.gradle-git-properties"
alias(libs.plugins.spring.boot)
id "jhipster.gatling-conventions"
id "jhipster.spring-cache-conventions"
id "jhipster.docker-conventions"
id "jhipster.code-quality-conventions"
id "org.liquibase.gradle"
id "jhipster.node-gradle-conventions"
// jhipster-needle-gradle-plugins - JHipster will add additional gradle plugins here
}
group = "edu.nextstep.msa"
version = "0.0.1-SNAPSHOT"
description = ""
sourceCompatibility=17
targetCompatibility=17
assert System.properties["java.specification.version"] == "17" || "21" || "22"
ext {
springProfiles = ""
if (project.hasProperty("tls")) {
springProfiles += ",tls"
}
if (project.hasProperty("e2e")) {
springProfiles += ",e2e"
}
}
repositories {
// Local maven repository is required for libraries built locally with maven like development jhipster-bom.
// mavenLocal()
mavenCentral()
// jhipster-needle-gradle-repositories - JHipster will add additional repositories
}
apply plugin: 'io.spring.dependency-management'
apply from: "gradle/liquibase.gradle"
// jhipster-needle-gradle-apply-from - JHipster will add additional gradle scripts to be applied here
if (project.hasProperty("prod")) {
apply from: "gradle/profile_prod.gradle"
} else {
apply from: "gradle/profile_dev.gradle"
}
if (project.hasProperty("war")) {
apply from: "gradle/war.gradle"
}
if (project.hasProperty("zipkin")) {
apply from: "gradle/zipkin.gradle"
}
idea {
module {
excludeDirs += files("node_modules")
}
}
eclipse {
sourceSets {
main {
java {
srcDirs += ["build/generated/sources/annotationProcessor/java/main"]
}
}
}
}
defaultTasks "bootRun"
springBoot {
mainClass = "edu.nextstep.msa.MsaExcampleApp"
}
test {
useJUnitPlatform()
exclude "**/*IT*", "**/*IntTest*"
testLogging {
events 'FAILED', 'SKIPPED'
}
jvmArgs += '-Djava.security.egd=file:/dev/./urandom -Xmx512m'
// uncomment if the tests reports are not generated
// see https://github.com/jhipster/generator-jhipster/pull/2771 and https://github.com/jhipster/generator-jhipster/pull/4484
// ignoreFailures true
reports.html.required = false
testLogging.exceptionFormat "full"
}
check.dependsOn integrationTest
task testReport(type: TestReport) {
destinationDirectory = file("$buildDir/reports/tests")
testResults.from(test)
}
task integrationTestReport(type: TestReport) {
destinationDirectory = file("$buildDir/reports/tests")
testResults.from(integrationTest)
}
gitProperties {
failOnNoGitDirectory = false
keys = ["git.branch", "git.commit.id.abbrev", "git.commit.id.describe"]
}
tasks.withType(com.gorylenko.GenerateGitPropertiesTask).configureEach {
outputs.doNotCacheIf("Task is always executed") { true }
}
configurations {
providedRuntime
implementation.exclude module: "spring-boot-starter-tomcat"
}
dependencies {
implementation "com.fasterxml.jackson.datatype:jackson-datatype-hppc"
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310"
testImplementation("com.tngtech.archunit:archunit-junit5-api:${archunitJunit5Version}") {
exclude group: "org.slf4j", module: "slf4j-api"
}
testRuntimeOnly("com.tngtech.archunit:archunit-junit5-engine:${archunitJunit5Version}") {
exclude group: "org.slf4j", module: "slf4j-api"
}
implementation "io.micrometer:micrometer-registry-prometheus-simpleclient"
implementation "jakarta.annotation:jakarta.annotation-api"
implementation "org.apache.commons:commons-lang3"
annotationProcessor "org.mapstruct:mapstruct-processor:${mapstructVersion}"
implementation "org.mapstruct:mapstruct:${mapstructVersion}"
annotationProcessor "org.springframework.boot:spring-boot-configuration-processor"
implementation "org.springframework.boot:spring-boot-loader-tools"
implementation "org.springframework.boot:spring-boot-starter-actuator"
implementation "org.springframework.boot:spring-boot-starter-aop"
implementation "org.springframework.boot:spring-boot-starter-logging"
implementation "org.springframework.boot:spring-boot-starter-mail"
implementation "org.springframework.boot:spring-boot-starter-oauth2-resource-server"
implementation "org.springframework.boot:spring-boot-starter-security"
testImplementation "org.springframework.boot:spring-boot-starter-test"
implementation "org.springframework.boot:spring-boot-starter-thymeleaf"
implementation "org.springframework.boot:spring-boot-starter-undertow"
modules {
module("org.springframework.boot:spring-boot-starter-tomcat") {
replacedBy("org.springframework.boot:spring-boot-starter-undertow", "Use Undertow instead of Tomcat")
}
}
implementation "org.springframework.boot:spring-boot-starter-validation"
implementation "org.springframework.boot:spring-boot-starter-web"
testImplementation "org.springframework.boot:spring-boot-test"
implementation "org.springframework.cloud:spring-cloud-starter"
implementation "org.springframework.cloud:spring-cloud-starter-bootstrap"
implementation "org.springframework.cloud:spring-cloud-starter-circuitbreaker-resilience4j"
implementation "org.springframework.cloud:spring-cloud-starter-consul-config"
implementation "org.springframework.cloud:spring-cloud-starter-consul-discovery"
implementation "org.springframework.retry:spring-retry"
testImplementation "org.springframework.security:spring-security-test"
implementation platform(libs.spring.cloud.dependencies)
implementation libs.jhipster.framework
implementation libs.springdoc.openapi.starter.webmvc.api
implementation "org.springframework.boot:spring-boot-starter-data-jpa"
implementation "org.springframework.security:spring-security-data"
implementation "com.fasterxml.jackson.datatype:jackson-datatype-hibernate6"
implementation "com.fasterxml.jackson.module:jackson-module-jaxb-annotations"
implementation "com.zaxxer:HikariCP"
implementation "org.hibernate.orm:hibernate-core"
implementation "org.hibernate.validator:hibernate-validator"
testImplementation "org.testcontainers:jdbc"
testImplementation "org.testcontainers:junit-jupiter"
testImplementation "org.testcontainers:testcontainers"
annotationProcessor "org.glassfish.jaxb:jaxb-runtime"
annotationProcessor "org.hibernate.orm:hibernate-jpamodelgen"
developmentOnly "org.springframework.boot:spring-boot-docker-compose"
// jhipster-needle-gradle-dependency - JHipster will add additional dependencies here
}
task cleanResources(type: Delete) {
delete "build/resources"
}
compileJava.dependsOn processResources
processResources.dependsOn bootBuildInfo