forked from tchiotludo/akhq
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
235 lines (197 loc) · 9.56 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
plugins {
// micronaut
id "com.github.johnrengelman.shadow" version "7.1.0"
id "io.micronaut.application" version "3.0.1"
// akhq
id "com.gorylenko.gradle-git-properties" version "2.3.2"
id 'com.adarshr.test-logger' version '3.1.0'
id 'org.gradle.test-retry' version '1.3.1'
id 'com.github.psxpaul.execfork' version '0.1.15'
id "com.github.ben-manes.versions" version "0.39.0"
id "com.github.davidmc24.gradle.plugin.avro" version "1.3.0"
}
group "org.akhq"
version "0.21.0"
mainClassName = "org.akhq.App"
sourceCompatibility = 11
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'
resolutionStrategy {
force("org.apache.kafka:kafka-clients:" + kafkaVersion)
force("org.apache.kafka:kafka-streams:" + kafkaVersion)
force("org.apache.kafka:kafka_" + kafkaScalaVersion + ":" + kafkaVersion)
force("org.slf4j:slf4j-api:1.7.32")
force("org.slf4j:jul-to-slf4j:1.7.32")
force("org.slf4j:log4j-over-slf4j:1.7.32")
}
}
/**********************************************************************************************************************\
* 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:micronaut-validation"
annotationProcessor 'io.micronaut.openapi:micronaut-openapi'
implementation "io.micronaut:micronaut-inject"
implementation "io.micronaut:micronaut-validation"
implementation "io.micronaut:micronaut-runtime"
implementation "io.micronaut:micronaut-http-server-netty"
implementation "io.swagger.core.v3:swagger-annotations"
runtimeOnly 'ch.qos.logback:logback-classic:1.2.9'
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.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: "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.0'
// strimzi
implementation group: 'io.strimzi', name: 'kafka-oauth-common', version: '0.9.0'
implementation group: 'io.strimzi', name: 'kafka-oauth-client', version: '0.9.0'
// log
implementation group: 'org.slf4j', name: 'slf4j-api', version: '2.0.0-alpha5'
implementation group: 'org.slf4j', name: 'jul-to-slf4j', version: '2.0.0-alpha5'
implementation group: 'org.slf4j', name: 'log4j-over-slf4j', version: '2.0.0-alpha5'
// utils
implementation group: 'org.codehaus.httpcache4j.uribuilder', name: 'uribuilder', version: '2.0.0'
implementation 'com.google.guava:guava:31.0.1-jre'
implementation 'com.google.code.gson:gson:2.8.9'
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8'
// avro
implementation 'org.apache.avro:avro:1.11.0'
// protobuf
implementation group: "com.google.protobuf", name: "protobuf-java", version: '3.19.2'
implementation group: "com.google.protobuf", name: "protobuf-java-util", version: '3.19.2'
// Password hashing
implementation group: "org.mindrot", name: "jbcrypt", version: "0.4"
// https://mvnrepository.com/artifact/org.codehaus.groovy/groovy-all
implementation group: 'org.codehaus.groovy', name: 'groovy-all', version: '3.0.9'
// api
// client
implementation project(":client")
//AWS MSK IAM Auth
implementation group: 'software.amazon.msk', name: 'aws-msk-iam-auth', version: '1.1.4'
}
/**********************************************************************************************************************\
* Test
**********************************************************************************************************************/
test {
useJUnitPlatform()
testLogging {
exceptionFormat = 'full'
}
retry {
maxRetries = 5
maxFailures = 15
}
}
dependencies {
testImplementation 'ch.qos.logback:logback-classic:1.2.9'
// micronaut test
testAnnotationProcessor "org.projectlombok:lombok:" + lombokVersion
testCompileOnly 'org.projectlombok:lombok:' + lombokVersion
testAnnotationProcessor "io.micronaut:micronaut-inject-java"
testImplementation "io.micronaut.test:micronaut-test-junit5"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:5.8.2"
testImplementation "org.junit.jupiter:junit-jupiter-api:5.8.2"
testImplementation "org.junit.jupiter:junit-jupiter-params:5.8.2"
testImplementation "io.micronaut:micronaut-http-client"
testImplementation "io.micronaut.rxjava2:micronaut-rxjava2-http-client"
// 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 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.15'
testImplementation 'org.hamcrest:hamcrest:2.2'
testImplementation 'org.hamcrest:hamcrest-library:2.2'
testImplementation 'org.mockito:mockito-junit-jupiter:4.1.0'
testImplementation 'com.salesforce.kafka.test:kafka-junit5:3.2.3'
testImplementation 'com.fasterxml.jackson.core:jackson-core:'
testImplementation 'com.fasterxml.jackson.core:jackson-annotations'
testImplementation 'com.fasterxml.jackson.core:jackson-databind'
testImplementation 'org.codehaus.jackson:jackson-mapper-lgpl:1.9.11'
}
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
main = "org.akhq.KafkaTestCluster"
}
task testInjectData(type:JavaExec) {
group = 'verification'
description = 'Inject data in a existing kafka cluster'
classpath sourceSets.test.runtimeClasspath
main = "org.akhq.KafkaTestCluster"
args 'inject'
}
test.dependsOn "startTestKafkaCluster"
task startTestKafkaCluster(type: com.github.psxpaul.task.JavaExecFork, dependsOn: 'testClasses') {
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"