forked from open-telemetry/opentelemetry-java
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
149 lines (134 loc) · 4.55 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
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
plugins {
id("otel.java-conventions")
id("otel.publish-conventions")
id("otel.jmh-conventions")
id("otel.animalsniffer-conventions")
}
apply<io.opentelemetry.gradle.OtelVersionClassPlugin>()
description = "OpenTelemetry Protocol (OTLP) Exporters"
otelJava.moduleName.set("io.opentelemetry.exporter.otlp")
base.archivesName.set("opentelemetry-exporter-otlp")
dependencies {
api(project(":sdk:trace"))
api(project(":sdk:metrics"))
api(project(":sdk:logs"))
implementation(project(":exporters:otlp:common"))
implementation(project(":exporters:sender:okhttp"))
implementation(project(":sdk-extensions:autoconfigure-spi"))
compileOnly("io.grpc:grpc-stub")
testImplementation(project(":exporters:otlp:testing-internal"))
testImplementation("com.linecorp.armeria:armeria-junit5")
testImplementation("com.google.api.grpc:proto-google-common-protos")
testImplementation("com.squareup.okhttp3:okhttp-tls")
testImplementation("io.grpc:grpc-stub")
jmhImplementation(project(":sdk:testing"))
jmhImplementation(project(":exporters:sender:grpc-managed-channel"))
jmhImplementation("com.linecorp.armeria:armeria")
jmhImplementation("com.linecorp.armeria:armeria-grpc")
jmhImplementation("io.opentelemetry.proto:opentelemetry-proto")
jmhRuntimeOnly("com.squareup.okhttp3:okhttp")
jmhRuntimeOnly("io.grpc:grpc-netty")
}
val testJavaVersion: String? by project
testing {
suites {
register<JvmTestSuite>("testGrpcNetty") {
dependencies {
implementation(project(":exporters:sender:grpc-managed-channel"))
implementation(project(":exporters:otlp:testing-internal"))
implementation("io.grpc:grpc-netty")
implementation("io.grpc:grpc-stub")
implementation("io.grpc:grpc-inprocess")
}
targets {
all {
testTask {
systemProperty(
"io.opentelemetry.exporter.internal.grpc.GrpcSenderProvider",
"io.opentelemetry.exporter.sender.grpc.managedchannel.internal.UpstreamGrpcSenderProvider"
)
}
}
}
}
register<JvmTestSuite>("testGrpcNettyShaded") {
dependencies {
implementation(project(":exporters:sender:grpc-managed-channel"))
implementation(project(":exporters:otlp:testing-internal"))
implementation("io.grpc:grpc-netty-shaded")
implementation("io.grpc:grpc-stub")
implementation("io.grpc:grpc-inprocess")
}
targets {
all {
testTask {
systemProperty(
"io.opentelemetry.exporter.internal.grpc.GrpcSenderProvider",
"io.opentelemetry.exporter.sender.grpc.managedchannel.internal.UpstreamGrpcSenderProvider"
)
}
}
}
}
register<JvmTestSuite>("testGrpcOkhttp") {
dependencies {
implementation(project(":exporters:sender:grpc-managed-channel"))
implementation(project(":exporters:otlp:testing-internal"))
implementation("io.grpc:grpc-okhttp")
implementation("io.grpc:grpc-stub")
implementation("io.grpc:grpc-inprocess")
}
targets {
all {
testTask {
systemProperty(
"io.opentelemetry.exporter.internal.grpc.GrpcSenderProvider",
"io.opentelemetry.exporter.sender.grpc.managedchannel.internal.UpstreamGrpcSenderProvider"
)
}
}
}
}
register<JvmTestSuite>("testJdkHttpSender") {
dependencies {
implementation(project(":exporters:sender:jdk"))
implementation(project(":exporters:otlp:testing-internal"))
implementation("io.grpc:grpc-stub")
}
targets {
all {
testTask {
systemProperty(
"io.opentelemetry.exporter.internal.http.HttpSenderProvider",
"io.opentelemetry.exporter.sender.jdk.internal.JdkHttpSenderProvider"
)
enabled = !testJavaVersion.equals("8")
}
}
}
}
register<JvmTestSuite>("testSpanPipeline") {
dependencies {
implementation("io.opentelemetry.proto:opentelemetry-proto")
implementation("com.linecorp.armeria:armeria-grpc-protocol")
implementation("com.linecorp.armeria:armeria-junit5")
}
}
}
}
tasks {
check {
dependsOn(
testing.suites.filter {
// Mainly to conveniently profile through IDEA. Don't add to check task, it's for
// manual invocation.
name != "testSpanPipeline"
},
)
}
}
afterEvaluate {
tasks.named<JavaCompile>("compileTestJdkHttpSenderJava") {
options.release.set(11)
}
}