forked from tchiotludo/akhq
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
297 lines (250 loc) · 12.1 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 {
// micronaut
id "com.github.johnrengelman.shadow" version "8.1.1"
id "io.micronaut.application" version "4.4.2"
// akhq
id "com.gorylenko.gradle-git-properties" version "2.4.2"
id 'com.adarshr.test-logger' version '4.0.0'
id 'org.gradle.test-retry' version '1.6.0'
id 'com.github.psxpaul.execfork' version '0.2.2'
id "com.github.ben-manes.versions" version "0.51.0"
id "com.github.davidmc24.gradle.plugin.avro" version "1.9.1"
// idea
id "org.jetbrains.gradle.plugin.idea-ext" version "1.1.9"
}
java {
sourceCompatibility = JavaVersion.toVersion("17")
targetCompatibility = JavaVersion.toVersion("17")
}
application {
mainClass.set("org.akhq.App")
}
group "org.akhq"
version "0.25.1"
repositories {
mavenLocal()
mavenCentral()
maven { url 'https://packages.confluent.io/maven/' }
maven { url 'https://jitpack.io' }
}
configurations.all {
exclude group: 'org.slf4j', module: 'slf4j-log4j12'
exclude group: 'org.apache.logging.log4j', module: 'log4j-slf4j-impl'
exclude group: 'org.apache.logging.log4j', module: 'log4j-core'
exclude group: 'org.apache.logging.log4j', module: 'log4j-api'
exclude group: 'org.slf4j', module: 'slf4j-reload4j'
resolutionStrategy {
force("org.apache.kafka:kafka-clients:" + kafkaVersion)
force("org.apache.kafka:kafka-streams:" + kafkaVersion)
force("org.apache.kafka:kafka-server-common:" + kafkaVersion)
force("org.apache.kafka:kafka_" + kafkaScalaVersion + ":" + kafkaVersion)
force("com.google.protobuf:protobuf-java:3.25.2")
force("com.fasterxml.jackson:jackson-bom:" + jacksonVersion)
force("com.fasterxml.jackson.core:jackson-core:" + jacksonVersion)
force("com.fasterxml.jackson.core:jackson-databind:" + jacksonVersion)
force("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:" + jacksonVersion)
force("com.fasterxml.jackson.module:jackson-module-scala_" + kafkaScalaVersion + ":" + jacksonVersion)
}
}
/**********************************************************************************************************************\
* IntelliJ IDEA
**********************************************************************************************************************/
idea.project.settings {
taskTriggers {
beforeBuild generateAvroJava
beforeRebuild generateAvroJava
}
}
/**********************************************************************************************************************\
* Micronaut
**********************************************************************************************************************/
micronaut {
runtime("netty")
testRuntime("junit5")
processing {
incremental(true)
annotations("org.akhq.*")
}
}
/**********************************************************************************************************************\
* Dependencies
**********************************************************************************************************************/
dependencies {
// lombok
annotationProcessor("org.projectlombok:lombok:" + lombokVersion)
compileOnly("org.projectlombok:lombok:" + lombokVersion)
// micronaut
annotationProcessor("io.micronaut:micronaut-inject-java")
annotationProcessor("io.micronaut.validation:micronaut-validation-processor")
annotationProcessor("io.micronaut.openapi:micronaut-openapi")
implementation("io.micronaut:micronaut-inject")
implementation("io.micronaut:micronaut-runtime")
implementation("io.micronaut.validation:micronaut-validation")
implementation("io.micronaut:micronaut-http-client")
implementation("io.micronaut:micronaut-http-server-netty")
implementation("io.micronaut:micronaut-jackson-databind")
implementation("io.swagger.core.v3:swagger-annotations")
runtimeOnly("ch.qos.logback:logback-classic")
runtimeOnly("org.yaml:snakeyaml")
implementation("io.micronaut.security:micronaut-security-annotations")
implementation("io.micronaut.security:micronaut-security-jwt")
implementation("io.micronaut.security:micronaut-security-ldap")
implementation("io.micronaut.security:micronaut-security-oauth2")
implementation("io.micronaut:micronaut-management")
implementation("io.micronaut:micronaut-retry")
implementation("io.micronaut.micrometer:micronaut-micrometer-registry-prometheus")
implementation("io.micronaut.cache:micronaut-cache-core")
implementation("io.micronaut.rxjava2:micronaut-rxjava2")
implementation("io.micronaut.rxjava2:micronaut-rxjava2-http-server-netty")
// kafka
implementation group: "org.apache.kafka", name: "kafka_" + kafkaScalaVersion, version: kafkaVersion
implementation group: "org.apache.kafka", name: "kafka-clients", version: kafkaVersion
implementation group: "org.apache.kafka", name: "kafka-streams", version: kafkaVersion
implementation group: "io.confluent.ksql", name: "ksqldb-api-client", version: confluentVersion
implementation group: "io.confluent", name: "kafka-schema-registry-client", version: confluentVersion
implementation group: "io.confluent", name: "kafka-avro-serializer", version: confluentVersion
implementation group: "io.confluent", name: "kafka-json-schema-serializer", version: confluentVersion
implementation group: "io.confluent", name: "kafka-protobuf-serializer", version: confluentVersion
implementation group: "io.confluent", name: "kafka-client-plugins", version: confluentVersion + "-ce"
implementation ("org.sourcelab:kafka-connect-client:4.0.4")
// strimzi
implementation group: 'io.strimzi', name: 'kafka-oauth-common', version: '0.15.0'
implementation group: 'io.strimzi', name: 'kafka-oauth-client', version: '0.15.0'
// log
implementation group: 'org.slf4j', name: 'slf4j-api', version: '2.0.16'
implementation group: 'org.slf4j', name: 'jul-to-slf4j', version: '2.0.16'
implementation group: 'org.slf4j', name: 'log4j-over-slf4j', version: '2.0.16'
// utils
implementation group: 'org.codehaus.httpcache4j.uribuilder', name: 'uribuilder', version: '2.0.0'
implementation 'com.google.guava:guava:33.3.1-jre'
implementation 'com.google.code.gson:gson:2.11.0'
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8'
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310'
// avro
implementation 'org.apache.avro:avro:1.12.0'
// jackson-module-scala
implementation group: 'com.fasterxml.jackson.module', name: 'jackson-module-scala_2.13', version: '2.17.2'
// protobuf
implementation group: "com.google.protobuf", name: "protobuf-java", version: '4.27.0'
implementation group: "com.google.protobuf", name: "protobuf-java-util", version: '4.27.1'
//cenk is testing
implementation("io.micronaut:micronaut-http-client")
implementation("io.micronaut:micronaut-inject")
implementation("io.micronaut:micronaut-runtime")
implementation("jakarta.inject:jakarta.inject-api")
implementation("org.reactivestreams:reactive-streams")
// Password hashing
implementation group: "org.mindrot", name: "jbcrypt", version: "0.4"
implementation group: 'org.apache.groovy', name: 'groovy-all', version: '4.0.23'
// api
// client
implementation project(":client")
//AWS MSK IAM Auth
implementation group: 'software.amazon.msk', name: 'aws-msk-iam-auth', version: '2.2.0'
// AWS Glue serde
implementation ("software.amazon.glue:schema-registry-serde:1.1.20")
implementation group: 'io.projectreactor', name: 'reactor-core', version: '3.6.10'
implementation 'io.jsonwebtoken:jjwt-impl:0.12.6'
}
/**********************************************************************************************************************\
* Test
**********************************************************************************************************************/
test {
useJUnitPlatform()
testLogging {
exceptionFormat = 'full'
}
retry {
maxRetries = 5
maxFailures = 15
}
retry {
maxRetries = 5
maxFailures = 15
}
}
dependencies {
testImplementation 'ch.qos.logback:logback-classic'
// micronaut test
testAnnotationProcessor "org.projectlombok:lombok:" + lombokVersion
testCompileOnly 'org.projectlombok:lombok:' + lombokVersion
testAnnotationProcessor "io.micronaut:micronaut-inject-java"
testImplementation("org.junit.jupiter:junit-jupiter-api")
testImplementation("io.micronaut.test:micronaut-test-junit5")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
testImplementation("org.junit.jupiter:junit-jupiter-engine")
testImplementation ("org.junit.jupiter:junit-jupiter-params")
testImplementation ("io.micronaut:micronaut-http-client")
testImplementation ("io.micronaut:micronaut-runtime")
testImplementation ("io.micronaut:micronaut-management")
testImplementation ("io.micronaut:micronaut-inject")
testImplementation ("io.micronaut.rxjava2:micronaut-rxjava2-http-client")
testImplementation("io.micronaut.test:micronaut-test-rest-assured")
// test
testImplementation "org.apache.kafka:kafka-clients:" + kafkaVersion + ":test"
testImplementation "org.apache.kafka:kafka_" + kafkaScalaVersion + ":" + kafkaVersion
testImplementation "org.apache.kafka:kafka_" + kafkaScalaVersion + ":" + kafkaVersion + ":test"
testImplementation "io.confluent:kafka-schema-registry:" + confluentVersion
testImplementation "io.confluent:kafka-schema-registry:" + confluentVersion + ":tests"
testImplementation "org.apache.kafka:connect-runtime:" + kafkaVersion
testImplementation "org.apache.kafka:connect-file:" + kafkaVersion
testImplementation 'io.confluent.ksql:ksqldb-rest-app:' + confluentVersion
testImplementation group: 'org.apache.kafka', name: 'kafka-streams', version: kafkaVersion
testImplementation group: "io.confluent", name: "kafka-streams-avro-serde", version: confluentVersion
testImplementation "io.confluent:kafka-connect-avro-converter:" + confluentVersion
testImplementation group: 'commons-codec', name: 'commons-codec', version: '1.17.1'
testImplementation 'org.hamcrest:hamcrest:3.0'
testImplementation 'org.hamcrest:hamcrest-library:3.0'
testImplementation 'org.mockito:mockito-junit-jupiter'
testImplementation 'com.salesforce.kafka.test:kafka-junit5:3.2.5'
testImplementation 'org.apache.curator:curator-test:5.7.0'
testImplementation 'org.awaitility:awaitility:4.2.2'
}
testlogger {
theme 'mocha'
showExceptions true
showFullStackTraces true
showCauses true
slowThreshold 2000
showStandardStreams true
showPassedStandardStreams false
showSkippedStandardStreams true
}
task testKafkaCluster(type:JavaExec) {
group = 'verification'
description = 'Start a standalone test Kafka cluster'
classpath sourceSets.test.runtimeClasspath
mainClass = "org.akhq.KafkaTestCluster"
}
task testInjectData(type:JavaExec) {
group = 'verification'
description = 'Inject data in a existing kafka cluster'
classpath sourceSets.test.runtimeClasspath
mainClass = "org.akhq.KafkaTestCluster"
args 'inject'
}
test.dependsOn "startTestKafkaCluster"
task startTestKafkaCluster(type: com.github.psxpaul.task.JavaExecFork) {
dependsOn 'testClasses'
dependsOn 'buildLayers'
dependsOn 'shadowDistZip'
dependsOn 'shadowDistTar'
dependsOn 'distZip'
dependsOn 'distTar'
group = 'verification'
description = 'Start a global standalone test Kafka cluster during tests'
classpath = sourceSets.test.runtimeClasspath
main = 'org.akhq.KafkaTestCluster'
waitForOutput = 'Test data injected sleep done'
timeout = 300
}
/**********************************************************************************************************************\
* Jar
**********************************************************************************************************************/
shadowJar {
mergeServiceFiles()
zip64 true
}
processResources.dependsOn ":client:installFrontend"
processResources.dependsOn ":client:assembleFrontend"
processResources.dependsOn ":client:copyClientResources"