forked from tchiotludo/akhq
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
227 lines (190 loc) · 8.36 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
plugins {
// micronaut
id "io.spring.dependency-management" version "1.0.10.RELEASE"
id "com.github.johnrengelman.shadow" version "6.0.0"
id "application"
id "java"
id "net.ltgt.apt-eclipse" version "0.21"
id "net.ltgt.apt-idea" version "0.21"
id "com.gorylenko.gradle-git-properties" version "2.2.3"
// akhq
id 'com.adarshr.test-logger' version '2.1.0'
id 'org.gradle.test-retry' version '1.1.9'
id 'com.github.psxpaul.execfork' version '0.1.13'
id "com.github.ben-manes.versions" version "0.28.0"
id "com.commercehub.gradle.plugin.avro" version "0.21.0"
}
group "org.akhq"
version "0.1"
mainClassName = "org.akhq.App"
sourceCompatibility = 11
repositories {
mavenLocal()
mavenCentral()
jcenter()
maven { url 'http://packages.confluent.io/maven/' }
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
maven { url 'https://jitpack.io' }
}
idea {
module {
downloadJavadoc = false
downloadSources = true
}
}
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'
}
/**********************************************************************************************************************\
* Micronaut
**********************************************************************************************************************/
dependencyManagement {
imports {
mavenBom "io.micronaut:micronaut-bom:$micronautVersion"
}
}
configurations {
developmentOnly
}
run.classpath += configurations.developmentOnly
test.classpath += configurations.developmentOnly
run.jvmArgs('-noverify',
'-XX:TieredStopAtLevel=1',
'-Dmicronaut.environments=dev',
'-Dmicronaut.io.watch.restart=true'
)
tasks.withType(JavaCompile){
options.encoding = "UTF-8"
options.compilerArgs.add('-parameters')
}
/**********************************************************************************************************************\
* 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.2.3"
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
// 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'
// protobuf
implementation group: "com.google.protobuf", name: "protobuf-java", version: "3.13.0"
implementation group: "com.google.protobuf", name: "protobuf-java-util", version: "3.13.0"
// Password hashing
implementation group: "org.mindrot", name: "jbcrypt", version: "0.4"
// api
// client
implementation project(":client")
// 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"
// test
testImplementation "org.apache.kafka:kafka_2.12:" + kafkaVersion
// force jackson version compatible with kafka
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.14'
testImplementation 'org.hamcrest:hamcrest:2.2'
testImplementation 'org.hamcrest:hamcrest-library:2.2'
implementation 'org.apache.avro:avro:1.10.0'
implementation 'org.sourcelab:kafka-connect-client:3.1.0'
implementation 'com.google.guava:guava:29.0-jre'
implementation 'com.google.code.gson:gson:2.8.6'
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.11.2'
testImplementation 'org.mockito:mockito-junit-jupiter:3.5.7'
testImplementation 'com.salesforce.kafka.test:kafka-junit5:3.2.2'
testImplementation 'com.fasterxml.jackson.core:jackson-core:2.11.2'
testImplementation 'com.fasterxml.jackson.core:jackson-annotations:2.11.2'
testImplementation 'com.fasterxml.jackson.core:jackson-databind:2.11.2'
testImplementation 'org.codehaus.jackson:jackson-mapper-lgpl:1.9.13'
}
/**********************************************************************************************************************\
* Test
**********************************************************************************************************************/
test {
useJUnitPlatform()
testLogging {
exceptionFormat = 'full'
}
retry {
maxRetries = 5
maxFailures = 15
}
}
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"