-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
33 lines (27 loc) · 1.41 KB
/
build.gradle.kts
File metadata and controls
33 lines (27 loc) · 1.41 KB
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
plugins {
`java-library`
id("com.github.johnrengelman.shadow") version "6.0.0"
}
// Depend on all libraries that are in the bootstrap classloader when running the agent. When
// running tests, we simulate this by adding the jar produced by this project to the bootstrap
// classpath.
val versions: Map<String, String> by extra
dependencies {
api("io.opentelemetry.javaagent:opentelemetry-javaagent-bootstrap:${versions["opentelemetry_java_agent"]}")
api("io.opentelemetry.javaagent:opentelemetry-javaagent-api:${versions["opentelemetry_java_agent"]}")
implementation(project(":javaagent-core"))
implementation(project(":filter-api"))
implementation("ch.qos.logback:logback-classic:1.2.3")
implementation("org.slf4j:slf4j-api:${versions["slf4j"]}")
}
tasks {
shadowJar {
archiveFileName.set("testing-bootstrap.jar")
// need to exclude these logback classes from the bootstrap jar, otherwise tomcat will find them
// and try to load them from the bootstrap class loader, which will fail with NoClassDefFoundError
// since their super classes are servlet classes which are not in the bootstrap class loader
exclude("ch/qos/logback/classic/servlet/LogbackServletContainerInitializer.class")
exclude("ch/qos/logback/classic/servlet/LogbackServletContextListener.class")
exclude("META-INF/services/javax.servlet.ServletContainerInitializer")
}
}