Skip to content

Commit

Permalink
Compile only opentelemetry-api dependency (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
jack-berg authored Oct 26, 2023
1 parent abe4171 commit f128291
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ dependencies {
Java 17 or higher is required to build the projects in this repository. The built artifacts can be
used on Java 8 or higher.

To use this artifact you must also depend on `io.opentelemetry:opentelemetry-api:{{version}}`.
See [opentelemetry-java releases](https://github.com/open-telemetry/opentelemetry-java#releases) for
more information.

## Generating semantic conventions

Requires docker.
Expand Down
7 changes: 5 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,12 @@ nexusPublishing {
}
}

val opentelemetryJavaVersion = "1.31.0"

dependencies {
implementation(platform("io.opentelemetry:opentelemetry-bom:1.31.0"))
implementation("io.opentelemetry:opentelemetry-api")
compileOnly("io.opentelemetry:opentelemetry-api:$opentelemetryJavaVersion")

testImplementation("io.opentelemetry:opentelemetry-api:$opentelemetryJavaVersion")

testImplementation(platform("org.junit:junit-bom:5.10.0"))
testImplementation("org.junit.jupiter:junit-jupiter-api")
Expand Down

0 comments on commit f128291

Please sign in to comment.