diff --git a/README.md b/README.md
index a61e2b44..5db8804b 100644
--- a/README.md
+++ b/README.md
@@ -75,11 +75,13 @@ As an alternative, artefacts are also available on [JitPack](https://jitpack.io/
[![](https://jitpack.io/v/libp2p/jvm-libp2p.svg)](https://jitpack.io/#libp2p/jvm-libp2p)
### Using Gradle
-Add the Cloudsmith repository to the `repositories` section of your Gradle file.
+Add the required repositories to the `repositories` section of your Gradle file.
```groovy
repositories {
// ...
maven { url "https://dl.cloudsmith.io/public/libp2p/jvm-libp2p/maven/" }
+ maven { url "https://jitpack.io" }
+ maven { url "https://artifacts.consensys.net/public/maven/maven/" }
}
```
Add the library to the `implementation` part of your Gradle file.
@@ -90,7 +92,7 @@ dependencies {
}
```
### Using Maven
-Add the repository to the `dependencyManagement` section of the pom file:
+Add the required repositories to the `dependencyManagement` section of the pom file:
```xml
@@ -105,10 +107,17 @@ Add the repository to the `dependencyManagement` section of the pom file:
always
+
+ JitPack
+ https://jitpack.io
+
+
+ Consensys
+ https://artifacts.consensys.net/public/maven/maven/
+
```
-
-And then add jvm-libp2p as a dependency:
+Add the library to the `dependencies` section of the pom file:
``` xml
io.libp2p
diff --git a/build.gradle.kts b/build.gradle.kts
index 909cc20d..b66d7d32 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -153,6 +153,14 @@ configure(
publications {
register("mavenJava", MavenPublication::class) {
from(components["java"])
+ versionMapping {
+ usage("java-api") {
+ fromResolutionOf("runtimeClasspath")
+ }
+ usage("java-runtime") {
+ fromResolutionResult()
+ }
+ }
artifact(sourcesJar.get())
artifact(dokkaJar.get())
groupId = "io.libp2p"
diff --git a/versions.gradle b/versions.gradle
index 44bf4a25..700d5dd7 100644
--- a/versions.gradle
+++ b/versions.gradle
@@ -1,4 +1,8 @@
dependencyManagement {
+ // https://docs.spring.io/dependency-management-plugin/docs/current/reference/html/#pom-generation-disabling
+ generatedPomCustomization {
+ enabled = false
+ }
dependencies {
dependency "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4"