Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions buildSrc/src/main/kotlin/otel.publish-conventions.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,17 @@ publishing {
name.set("OpenTelemetry Java")
url.set("https://github.com/open-telemetry/opentelemetry-java")

withXml {
// Since 5.0 okhttp uses gradle metadata to choose either okhttp-jvm or okhttp-android.
// This does not work for maven builds that don't understand gradle metadata. They end up
// using the okhttp artifact that is an empty jar. Here we replace usages of okhttp with
// okhttp-jvm so that maven could get the actual okhttp dependency instead of the empty jar.
var result = asString()
var modified = result.toString().replace(">okhttp<", ">okhttp-jvm<")
result.clear()
result.append(modified)
}

licenses {
license {
name.set("The Apache License, Version 2.0")
Expand Down
2 changes: 1 addition & 1 deletion dependencyManagement/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ val DEPENDENCIES = listOf(
"com.google.code.findbugs:jsr305:3.0.2",
"com.google.guava:guava-beta-checker:1.0",
"com.sun.net.httpserver:http:20070405",
"com.squareup.okhttp3:okhttp-jvm:$okhttpVersion",
"com.squareup.okhttp3:okhttp:$okhttpVersion",
"com.tngtech.archunit:archunit-junit5:1.4.1",
"com.uber.nullaway:nullaway:0.12.10",
"edu.berkeley.cs.jqf:jqf-fuzz:1.7", // jqf-fuzz version 1.8+ requires Java 11+
Expand Down
8 changes: 2 additions & 6 deletions exporters/otlp/all/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ dependencies {
jmhImplementation("com.linecorp.armeria:armeria")
jmhImplementation("com.linecorp.armeria:armeria-grpc")
jmhImplementation("io.opentelemetry.proto:opentelemetry-proto")
jmhRuntimeOnly("com.squareup.okhttp3:okhttp-jvm")
jmhRuntimeOnly("com.squareup.okhttp3:okhttp")
jmhRuntimeOnly("io.grpc:grpc-netty")
}

Expand Down Expand Up @@ -64,12 +64,8 @@ testing {
}
}
}
if (it.equals("LATEST")) {
implementation("com.squareup.okhttp3:okhttp-jvm")
} else {
implementation("com.squareup.okhttp3:okhttp")
}

implementation("com.squareup.okhttp3:okhttp")
implementation("io.grpc:grpc-stub")
}

Expand Down
2 changes: 1 addition & 1 deletion exporters/otlp/testing-internal/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ dependencies {

api("io.opentelemetry.proto:opentelemetry-proto")
api("org.junit.jupiter:junit-jupiter-api")
implementation("com.squareup.okhttp3:okhttp-jvm")
implementation("com.squareup.okhttp3:okhttp")
implementation("org.junit.jupiter:junit-jupiter-params")

implementation("com.linecorp.armeria:armeria-grpc-protocol")
Expand Down
2 changes: 1 addition & 1 deletion exporters/sender/okhttp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dependencies {
implementation(project(":exporters:common"))
implementation(project(":sdk:common"))

implementation("com.squareup.okhttp3:okhttp-jvm")
implementation("com.squareup.okhttp3:okhttp")

compileOnly("io.grpc:grpc-stub")
compileOnly("com.fasterxml.jackson.core:jackson-core")
Expand Down
2 changes: 1 addition & 1 deletion sdk-extensions/jaeger-remote-sampler/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ dependencies {
implementation(project(":exporters:common"))
implementation(project(":exporters:sender:okhttp"))

implementation("com.squareup.okhttp3:okhttp-jvm")
implementation("com.squareup.okhttp3:okhttp")

compileOnly("io.grpc:grpc-api")
compileOnly("io.grpc:grpc-protobuf")
Expand Down
Loading