forked from tchiotludo/akhq
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
223 lines (188 loc) · 8.82 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
plugins {
// micronaut
id "com.github.johnrengelman.shadow" version "7.0.0"
id "io.micronaut.application" version "1.5.2"
// akhq
id "com.gorylenko.gradle-git-properties" version "2.3.1"
id 'com.adarshr.test-logger' version '3.0.0'
id 'org.gradle.test-retry' version '1.2.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.2.0"
id "com.palantir.git-version" version "0.12.3"
}
group "org.akhq"
// Grab version from last Git tag with git-version plugin
def gitVersionDetails = versionDetails()
version gitVersionDetails.lastTag
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)
}
}
/**********************************************************************************************************************\
* 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-client"
implementation "io.micronaut:micronaut-http-server-netty"
implementation "io.swagger.core.v3:swagger-annotations"
runtimeOnly 'ch.qos.logback:logback-classic:1.3.0-alpha5'
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"
// kafka
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 'org.sourcelab:kafka-connect-client:3.1.1'
// strimzi
implementation group: 'io.strimzi', name: 'kafka-oauth-common', version: '0.8.1'
implementation group: 'io.strimzi', name: 'kafka-oauth-client', version: '0.8.1'
// log
implementation group: 'org.slf4j', name: 'jul-to-slf4j', version: '1.8.+'
implementation group: 'org.slf4j', name: 'log4j-over-slf4j', version: '1.8.+'
// utils
implementation group: 'org.codehaus.httpcache4j.uribuilder', name: 'uribuilder', version: '2.0.0'
implementation 'com.google.guava:guava:30.1.1-jre'
implementation 'com.google.code.gson:gson:2.8.7'
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.12.3'
// avro
implementation 'org.apache.avro:avro:1.10.2'
// graal
implementation 'org.graalvm.sdk:graal-sdk:21.2.0'
// protobuf
implementation group: "com.google.protobuf", name: "protobuf-java", version: '3.17.3'
implementation group: "com.google.protobuf", name: "protobuf-java-util", version: '3.17.3'
// 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.8'
// api
// client
implementation project(":client")
}
/**********************************************************************************************************************\
* Test
**********************************************************************************************************************/
test {
useJUnitPlatform()
testLogging {
exceptionFormat = 'full'
}
retry {
maxRetries = 5
maxFailures = 15
}
}
dependencies {
testImplementation 'ch.qos.logback:logback-classic:1.3.0-alpha5'
// 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-params"
// 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:3.11.1'
testImplementation 'com.salesforce.kafka.test:kafka-junit5:3.2.2'
testImplementation 'com.fasterxml.jackson.core:jackson-core:2.12.3'
testImplementation 'com.fasterxml.jackson.core:jackson-annotations:2.12.3'
testImplementation 'com.fasterxml.jackson.core:jackson-databind:2.12.3'
testImplementation 'org.codehaus.jackson:jackson-mapper-lgpl:1.9.13'
}
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()
}
processResources.dependsOn ":client:installFrontend"
processResources.dependsOn ":client:assembleFrontend"
processResources.dependsOn ":client:copyClientResources"