-
Notifications
You must be signed in to change notification settings - Fork 795
/
build.gradle.kts
102 lines (81 loc) · 2.9 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
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
plugins {
id("otel.javaagent-instrumentation")
}
muzzle {
pass {
group.set("io.projectreactor.kafka")
module.set("reactor-kafka")
versions.set("[1.0.0,)")
assertInverse.set(true)
}
}
dependencies {
compileOnly(project(":muzzle"))
compileOnly("com.google.auto.value:auto-value-annotations")
annotationProcessor("com.google.auto.value:auto-value")
bootstrap(project(":instrumentation:kafka:kafka-clients:kafka-clients-0.11:bootstrap"))
implementation(project(":instrumentation:kafka:kafka-clients:kafka-clients-common:library"))
implementation(project(":instrumentation:reactor:reactor-3.1:library"))
// using 1.3 to be able to implement several new KafkaReceiver methods added in 1.3.3 and 1.3.21
// @NoMuzzle is used to ensure that this does not break muzzle checks
compileOnly("io.projectreactor.kafka:reactor-kafka:1.3.21")
testInstrumentation(project(":instrumentation:kafka:kafka-clients:kafka-clients-0.11:javaagent"))
testInstrumentation(project(":instrumentation:reactor:reactor-3.1:javaagent"))
testImplementation(project(":instrumentation:reactor:reactor-kafka-1.0:testing"))
testLibrary("io.projectreactor.kafka:reactor-kafka:1.0.0.RELEASE")
latestDepTestLibrary("io.projectreactor:reactor-core:3.4.+")
}
val testLatestDeps = findProperty("testLatestDeps") as Boolean
testing {
suites {
val testV1_3_3 by registering(JvmTestSuite::class) {
dependencies {
implementation(project(":instrumentation:reactor:reactor-kafka-1.0:testing"))
if (testLatestDeps) {
implementation("io.projectreactor.kafka:reactor-kafka:+")
implementation("io.projectreactor:reactor-core:3.4.+")
} else {
implementation("io.projectreactor.kafka:reactor-kafka:1.3.3")
}
}
targets {
all {
testTask.configure {
systemProperty("hasConsumerGroup", true)
}
}
}
}
val testV1_3_21 by registering(JvmTestSuite::class) {
dependencies {
implementation(project(":instrumentation:reactor:reactor-kafka-1.0:testing"))
if (testLatestDeps) {
implementation("io.projectreactor.kafka:reactor-kafka:+")
implementation("io.projectreactor:reactor-core:3.4.+")
} else {
implementation("io.projectreactor.kafka:reactor-kafka:1.3.21")
}
}
targets {
all {
testTask.configure {
systemProperty("hasConsumerGroup", true)
}
}
}
}
}
}
tasks {
withType<Test>().configureEach {
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service)
jvmArgs("-Dotel.instrumentation.kafka.experimental-span-attributes=true")
jvmArgs("-Dotel.instrumentation.messaging.experimental.receive-telemetry.enabled=true")
}
test {
systemProperty("hasConsumerGroup", testLatestDeps)
}
check {
dependsOn(testing.suites)
}
}