-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
106 lines (86 loc) · 3.72 KB
/
Copy pathbuild.gradle
File metadata and controls
106 lines (86 loc) · 3.72 KB
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
plugins {
id 'java'
id 'org.springframework.boot' version '4.0.3'
id 'io.spring.dependency-management' version '1.1.7'
id 'com.google.cloud.tools.jib' version '3.5.2'
}
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-log4j2'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation "org.springframework.boot:spring-boot-starter-flyway"
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:3.0.1'
implementation 'org.flywaydb:flyway-database-postgresql'
runtimeOnly 'org.postgresql:postgresql'
implementation 'org.projectlombok:lombok:1.18.42'
annotationProcessor 'org.projectlombok:lombok:1.18.42'
}
testing {
//noinspection GroovyAssignabilityCheck
suites {
unit(JvmTestSuite) {
sources { java { srcDirs = ['src/test/unit/java'] } resources { srcDirs = ['src/test/unit/resources'] } }
useJUnitJupiter()
dependencies {
implementation project()
implementation 'org.springframework.boot:spring-boot-starter-test'
implementation 'org.projectlombok:lombok:1.18.42'
annotationProcessor 'org.projectlombok:lombok:1.18.42'
}
}
integration(JvmTestSuite) {
sources { java { srcDirs = ['src/test/integration/java'] } resources { srcDirs = ['src/test/integration/resources'] } }
useJUnitJupiter()
dependencies {
implementation project()
implementation 'org.springframework.boot:spring-boot-starter-test'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation "org.springframework.boot:spring-boot-starter-webmvc-test"
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.testcontainers:testcontainers-postgresql:2.0.3'
implementation 'org.testcontainers:testcontainers-mockserver:2.0.3'
implementation 'org.testcontainers:testcontainers-junit-jupiter:2.0.3'
implementation 'org.flywaydb:flyway-database-postgresql'
implementation 'org.projectlombok:lombok:1.18.42'
annotationProcessor 'org.projectlombok:lombok:1.18.42'
}
}
end2end(JvmTestSuite) {
sources { java { srcDirs = ['src/test/end2end/java'] } resources { srcDirs = ['src/test/end2end/resources'] } }
useJUnitJupiter()
dependencies {
implementation project()
implementation 'org.springframework.boot:spring-boot-starter-test'
implementation 'org.testcontainers:testcontainers-junit-jupiter:2.0.3'
implementation 'org.projectlombok:lombok:1.18.42'
annotationProcessor 'org.projectlombok:lombok:1.18.42'
}
}
}
}
configurations {
configureEach {
exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging'
}
}
tasks.named('end2end') {
dependsOn {
jibDockerBuild
}
}
tasks.withType(Test).configureEach { testTask ->
jvmArgs "-javaagent:${configurations.getByName(testTask.name + 'RuntimeClasspath').resolvedConfiguration.resolvedArtifacts.find { it.name == 'byte-buddy-agent' }.file}"
}
jib {
to {
image = "${repository}/${serviceName}"
}
from {
image = "eclipse-temurin:21.0.10_7-jre"
}
}