diff --git a/README.md b/README.md index d1c8733..02e2e89 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/build.gradle.kts b/build.gradle.kts index 635a6ee..137c9ca 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -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")