-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
70 lines (58 loc) · 1.87 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
import de.undercouch.gradle.tasks.download.Download
plugins {
id 'application'
id 'com.diffplug.spotless' version '6.6.1'
id "de.undercouch.download" version "5.1.0"
}
ext {
kafkaVersion = '3.2.0'
slf4jVersion = '1.7.36'
jupiterVersion = '5.8.2'
prometheusJavaagentVersion = '0.16.0'
}
group = 'com.yushkevich'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '11'
apply plugin: 'java'
apply plugin: 'com.diffplug.spotless'
apply plugin: 'de.undercouch.download'
task downloadJavaAgent(type: Download) {
src "https://repo1.maven.org/maven2/io/prometheus/jmx/jmx_prometheus_javaagent/${prometheusJavaagentVersion}/jmx_prometheus_javaagent-${prometheusJavaagentVersion}.jar"
dest 'build/libs'
}
repositories {
mavenCentral()
}
dependencies {
implementation group: 'org.apache.kafka', name: 'kafka-clients', version: "${kafkaVersion}"
implementation group: 'org.apache.kafka', name: 'kafka-streams', version: "${kafkaVersion}"
implementation group: 'org.slf4j', name: 'slf4j-log4j12', version: "${slf4jVersion}"
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: "${jupiterVersion}"
testImplementation group: 'org.apache.kafka', name: 'kafka-streams-test-utils', version: "${kafkaVersion}"
}
application {
mainClass = 'com.yushkevich.emnify.KafkaStreamsChallengeApplication'
}
jar {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
manifest {
attributes(
'Main-Class': 'com.yushkevich.emnify.KafkaStreamsChallengeApplication'
)
}
}
test {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
}
}
spotless {
java {
importOrder()
removeUnusedImports()
googleJavaFormat()
}
}
build.dependsOn downloadJavaAgent