From 9d71e2e8bb8cb426cd99bcad273f0eb2f269d784 Mon Sep 17 00:00:00 2001 From: Yuri Schimke Date: Sun, 13 Jul 2025 09:30:19 +0100 Subject: [PATCH] Update docs for maven workaround (#8938) --- README.md | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/README.md b/README.md index 720d56f6e..e557fb1a0 100644 --- a/README.md +++ b/README.md @@ -141,6 +141,48 @@ Also, we have a [bill of materials (BOM)][bom] available to help you keep OkHttp } ``` +Maven and JVM Projects +---------------------- + +OkHttp is published as a Kotlin Multiplatform project. While Gradle handles this automatically, +Maven projects must select between `okhttp-jvm` and `okhttp-android`. The `okhttp` artifact will be empty in +Maven projects. + +```xml + + + + com.squareup.okhttp3 + okhttp-bom + 5.2.0 + pom + import + + + +``` + + + +```xml + + com.squareup.okhttp3 + okhttp-jvm + + 5.2.0 + + + + com.squareup.okhttp3 + mockwebserver3 + + + + com.squareup.okhttp3 + logging-interceptor + +``` + MockWebServer -------------