-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
82 lines (69 loc) · 2.66 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
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath "com.github.jengelman.gradle.plugins:shadow:6.0.0"
}
}
plugins {
id 'java'
id "com.github.davidmc24.gradle.plugin.avro" version "1.0.0"
}
group 'io.confluent'
version '1.0-SNAPSHOT'
repositories {
mavenCentral()
maven {
url "https://packages.confluent.io/maven"
}
}
apply plugin: "com.github.johnrengelman.shadow"
dependencies {
implementation "org.apache.avro:avro:1.10.2"
implementation 'org.apache.logging.log4j:log4j-api:2.17.2'
implementation 'org.apache.logging.log4j:log4j-core:2.17.2'
implementation 'org.apache.logging.log4j:log4j-slf4j-impl:2.17.2'
implementation('org.apache.kafka:kafka-streams:3.5.1') {
exclude group: 'org.apache.kafka', module: 'kafka-clients'
}
implementation('org.apache.kafka:kafka-clients:3.5.1!!')
implementation('io.confluent:kafka-streams-avro-serde:6.1.1') {
exclude group: 'org.apache.kafka', module: 'kafka-clients'
exclude group: 'org.apache.kafka', module: 'kafka-streams'
}
testImplementation "org.apache.kafka:kafka-streams-test-utils:3.5.1"
testImplementation "junit:junit:4.13.2"
testImplementation 'org.hamcrest:hamcrest:2.2'
}
test {
testLogging {
outputs.upToDateWhen { false }
showStandardStreams = true
exceptionFormat = "full"
}
}
var basePackage = 'io.confluent.developer.'
def exerciseMap = [aggregate: basePackage + 'aggregate.StreamsAggregate',
basic : basePackage + 'basic.BasicStreams',
errors: basePackage + 'errors.StreamsErrorHandling',
joins: basePackage + 'joins.StreamsJoin',
ktable: basePackage + 'ktable.KTableExample',
processor: basePackage + 'processor.ProcessorApi',
time: basePackage + 'time.StreamsTimestampExtractor',
windows: basePackage + 'windows.StreamsWindows']
task runStreams(type: Exec) {
var streamsFullPath = ''
if (project.hasProperty("args")) {
var exercise = project.getProperty("args")
streamsFullPath = exerciseMap[exercise]
if (streamsFullPath == null) {
throw new StopActionException("!!!!!! You entered '${exercise}' for an exercise to run, but that's not a valid entry. The valid options are ${exerciseMap.keySet()}" )
}
dependsOn assemble
group = "Execution"
println "Using example ${streamsFullPath}"
description = "Run a Kafka Streams exercise"
commandLine "java", "-classpath", sourceSets.main.runtimeClasspath.getAsPath(), streamsFullPath
}
}