Skip to content

Commit f128291

Browse files
authored
Compile only opentelemetry-api dependency (#30)
1 parent abe4171 commit f128291

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ dependencies {
3737
Java 17 or higher is required to build the projects in this repository. The built artifacts can be
3838
used on Java 8 or higher.
3939

40+
To use this artifact you must also depend on `io.opentelemetry:opentelemetry-api:{{version}}`.
41+
See [opentelemetry-java releases](https://github.com/open-telemetry/opentelemetry-java#releases) for
42+
more information.
43+
4044
## Generating semantic conventions
4145

4246
Requires docker.

build.gradle.kts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,12 @@ nexusPublishing {
5454
}
5555
}
5656

57+
val opentelemetryJavaVersion = "1.31.0"
58+
5759
dependencies {
58-
implementation(platform("io.opentelemetry:opentelemetry-bom:1.31.0"))
59-
implementation("io.opentelemetry:opentelemetry-api")
60+
compileOnly("io.opentelemetry:opentelemetry-api:$opentelemetryJavaVersion")
61+
62+
testImplementation("io.opentelemetry:opentelemetry-api:$opentelemetryJavaVersion")
6063

6164
testImplementation(platform("org.junit:junit-bom:5.10.0"))
6265
testImplementation("org.junit.jupiter:junit-jupiter-api")

0 commit comments

Comments
 (0)