This repository was archived by the owner on Feb 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
129 lines (106 loc) · 4.57 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
import net.ltgt.gradle.errorprone.errorprone
plugins {
id("otel.java-conventions")
id("otel.publish-conventions")
id("otel.jmh-conventions")
}
group = "io.opentelemetry.javaagent"
dependencies {
implementation(project(":javaagent-bootstrap"))
implementation(project(":javaagent-extension-api"))
implementation(project(":javaagent-tooling:javaagent-tooling-java9"))
implementation(project(":instrumentation-api"))
implementation(project(":instrumentation-annotations-support"))
implementation(project(":muzzle"))
implementation("io.opentelemetry:opentelemetry-api")
testImplementation("io.opentelemetry:opentelemetry-api-events")
implementation("io.opentelemetry:opentelemetry-sdk")
implementation("io.opentelemetry:opentelemetry-sdk-extension-autoconfigure")
implementation("io.opentelemetry:opentelemetry-extension-kotlin")
implementation("io.opentelemetry:opentelemetry-extension-trace-propagators")
// the incubator's ViewConfigCustomizer is used to support loading yaml-based metric views
implementation("io.opentelemetry:opentelemetry-sdk-extension-incubator")
// Exporters with dependencies
implementation("io.opentelemetry:opentelemetry-exporter-logging")
implementation("io.opentelemetry:opentelemetry-exporter-otlp")
implementation("io.opentelemetry:opentelemetry-exporter-logging-otlp")
implementation("io.opentelemetry:opentelemetry-exporter-prometheus")
implementation("io.opentelemetry:opentelemetry-exporter-zipkin")
implementation("io.opentelemetry:opentelemetry-sdk-extension-jaeger-remote-sampler")
implementation("io.opentelemetry.contrib:opentelemetry-aws-xray-propagator")
api("net.bytebuddy:byte-buddy-dep")
implementation("org.ow2.asm:asm-tree")
implementation("org.ow2.asm:asm-util")
annotationProcessor("com.google.auto.service:auto-service")
compileOnly("com.google.auto.service:auto-service-annotations")
testCompileOnly("com.google.auto.service:auto-service-annotations")
// Used by byte-buddy but not brought in as a transitive dependency.
compileOnly("com.google.code.findbugs:annotations")
testCompileOnly("com.google.code.findbugs:annotations")
testImplementation(project(":testing-common"))
testImplementation("com.google.guava:guava")
testImplementation("org.junit-pioneer:junit-pioneer")
}
testing {
suites {
val testExceptionHandler by registering(JvmTestSuite::class) {
dependencies {
implementation(project(":javaagent-bootstrap"))
implementation(project(":javaagent-tooling"))
implementation("net.bytebuddy:byte-buddy-dep")
// Used by byte-buddy but not brought in as a transitive dependency.
compileOnly("com.google.code.findbugs:annotations")
}
}
val testMissingType by registering(JvmTestSuite::class) {
dependencies {
implementation(project(":javaagent-bootstrap"))
implementation(project(":javaagent-tooling"))
implementation("net.bytebuddy:byte-buddy-dep")
compileOnly("com.google.guava:guava")
// Used by byte-buddy but not brought in as a transitive dependency.
compileOnly("com.google.code.findbugs:annotations")
}
}
val testPatchBytecodeVersion by registering(JvmTestSuite::class) {
dependencies {
implementation(project(":javaagent-bootstrap"))
implementation(project(":javaagent-tooling"))
implementation("net.bytebuddy:byte-buddy-dep")
// Used by byte-buddy but not brought in as a transitive dependency.
compileOnly("com.google.code.findbugs:annotations")
}
}
}
}
// Here we only include autoconfigure but don"t include OTLP exporters to ensure they are only in
// the full distribution. We need to override the default exporter setting of OTLP as a result.
tasks {
withType<Test>().configureEach {
environment("OTEL_TRACES_EXPORTER", "none")
environment("OTEL_METRICS_EXPORTER", "none")
// required on jdk17
jvmArgs("--add-opens=java.base/java.lang=ALL-UNNAMED")
jvmArgs("--add-opens=java.base/java.util=ALL-UNNAMED")
jvmArgs("-XX:+IgnoreUnrecognizedVMOptions")
}
// TODO this should live in jmh-conventions
named<JavaCompile>("jmhCompileGeneratedClasses") {
options.errorprone {
isEnabled.set(false)
}
}
check {
dependsOn(testing.suites)
}
}
// Mockito inline mocking uses byte-buddy but agent tooling currently uses byte-buddy-dep, which cannot be on the same
// classpath. Disable inline mocking to prevent conflicts.
// TODO(anuraaga): Find a better solution
configurations {
testRuntimeClasspath {
dependencies {
exclude("org.mockito", "mockito-inline")
}
}
}