-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
59 lines (50 loc) · 1.31 KB
/
build.gradle.kts
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
group = "com.cluddles"
version = "1.0-SNAPSHOT"
repositories {
mavenCentral()
maven("https://packages.confluent.io/maven/")
}
dependencies {
implementation(libs.kotlin.logging)
implementation(libs.log4j.core)
implementation(libs.log4j.slf4j2)
implementation(libs.kafka.clients)
implementation(libs.kafka.avro.serializer)
testImplementation(kotlin("test"))
}
tasks.test {
useJUnitPlatform()
}
kotlin {
jvmToolchain(17)
}
buildscript {
repositories {
gradlePluginPortal()
maven("https://packages.confluent.io/maven/")
maven("https://jitpack.io")
}
}
plugins {
kotlin("jvm") version "2.0.0"
alias(libs.plugins.avro)
alias(libs.plugins.schema.registry)
}
tasks.register<JavaExec>("simpleConsumer") {
description = "Run the SimpleConsumer"
group = "run"
mainClass.set("com.cluddles.kafka.SimpleConsumerKt")
classpath = sourceSets["main"].runtimeClasspath
}
tasks.register<JavaExec>("simpleProducer") {
description = "Run the SimpleProducer"
group = "run"
mainClass.set("com.cluddles.kafka.SimpleProducerKt")
classpath = sourceSets["main"].runtimeClasspath
}
schemaRegistry {
url = "http://localhost:8081"
register {
subject("fruits-value", "src/main/avro/Fruit.avsc", "AVRO").setNormalized(true)
}
}