-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
129 lines (112 loc) · 4.11 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
plugins {
id 'org.springframework.boot' version '3.1.8'
id 'org.flywaydb.flyway' version '10.11.0'
id 'java'
id 'com.diffplug.spotless' version '6.25.0'
id "io.freefair.lombok" version "8.6"
id 'com.github.jk1.dependency-license-report' version '2.7'
}
apply plugin: 'io.spring.dependency-management'
apply from: '../gradle/intTest.gradle'
apply from: '../gradle/licenses.gradle'
apply from: 'gradle/jacoco.gradle'
group = 'de.codecentric'
def dbUrlDefault = 'jdbc:postgresql://localhost:10002/'
def dbUserDefault = 'postgres'
def dbPasswordDefault = 'postgres'
bootRun {
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
lombok {
version = "1.18.32"
}
flyway {
url = project.hasProperty('dbUrl') ? project.property('dbUrl') : dbUrlDefault
user = project.hasProperty('dbUser') ? project.property('dbUser') : dbUserDefault
password = project.hasProperty('dbPassword') ? project.property('dbPassword') : dbPasswordDefault
schemas = ['hc_track']
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
spotless {
java {
googleJavaFormat('1.17.0')
}
}
repositories {
mavenCentral()
maven {
url "https://repo.spring.io/milestone"
}
}
test {
useJUnitPlatform()
}
configurations {
testImplementation {
exclude group: 'junit', module: 'junit'
}
}
ext {
versions = [
restAssured : '5.4.0',
junitJupiter : '5.8.0',
chaosMonkey : '3.1.0',
testcontainers : '1.19.7',
reflections : '0.10.2',
postgresql : '42.7.3',
jna : '5.8.0'
]
}
// override the version the spring boot dependency-management plugin would enforce
ext['junit-jupiter.version'] = versions.junitJupiter
ext['jna.version'] = versions.jna // Required for Docker on ARM
dependencyManagement {
imports {
mavenBom 'org.springframework.modulith:spring-modulith-bom:1.1.3'
}
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.security:spring-security-oauth2-jose'
// Spring Modulith
implementation "org.springframework.modulith:spring-modulith-starter-core"
implementation "org.springframework.modulith:spring-modulith-starter-jpa"
implementation "org.springframework.modulith:spring-modulith-events-kafka"
intTestImplementation "org.springframework.modulith:spring-modulith-starter-test"
implementation 'io.micrometer:micrometer-tracing-bridge-otel'
implementation 'io.opentelemetry:opentelemetry-exporter-zipkin'
runtimeOnly "org.postgresql:postgresql:$versions.postgresql"
runtimeOnly 'org.flywaydb:flyway-core'
runtimeOnly "de.codecentric:chaos-monkey-spring-boot:$versions.chaosMonkey"
runtimeOnly "org.aspectj:aspectjweaver"
testImplementation "org.junit.jupiter:junit-jupiter"
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation "org.reflections:reflections:$versions.reflections"
intTestImplementation "org.junit.jupiter:junit-jupiter"
intTestImplementation 'org.springframework.boot:spring-boot-starter-test'
intTestImplementation "io.rest-assured:json-path:$versions.restAssured"
intTestImplementation("io.rest-assured:rest-assured:$versions.restAssured") {
exclude group: 'com.sun.xml.bind', module: 'jaxb-osgi'
}
intTestImplementation("io.rest-assured:xml-path:$versions.restAssured") {
exclude group: 'com.sun.xml.bind', module: 'jaxb-osgi'
}
intTestImplementation platform("org.testcontainers:testcontainers-bom:$versions.testcontainers")
intTestImplementation 'org.testcontainers:junit-jupiter'
intTestImplementation 'org.testcontainers:postgresql'
}
// disable the jar task to prevent the plain jar from being created.
tasks.named("jar") {
enabled = false
}