Skip to content

Commit 115a481

Browse files
Merge pull request #310 from libp2p/1.0.0-hotfix_2
2 parents e4e6b4c + 5d38203 commit 115a481

File tree

3 files changed

+25
-4
lines changed

3 files changed

+25
-4
lines changed

README.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,13 @@ As an alternative, artefacts are also available on [JitPack](https://jitpack.io/
7575
[![](https://jitpack.io/v/libp2p/jvm-libp2p.svg)](https://jitpack.io/#libp2p/jvm-libp2p)
7676

7777
### Using Gradle
78-
Add the Cloudsmith repository to the `repositories` section of your Gradle file.
78+
Add the required repositories to the `repositories` section of your Gradle file.
7979
```groovy
8080
repositories {
8181
// ...
8282
maven { url "https://dl.cloudsmith.io/public/libp2p/jvm-libp2p/maven/" }
83+
maven { url "https://jitpack.io" }
84+
maven { url "https://artifacts.consensys.net/public/maven/maven/" }
8385
}
8486
```
8587
Add the library to the `implementation` part of your Gradle file.
@@ -90,7 +92,7 @@ dependencies {
9092
}
9193
```
9294
### Using Maven
93-
Add the repository to the `dependencyManagement` section of the pom file:
95+
Add the required repositories to the `dependencyManagement` section of the pom file:
9496
```xml
9597
<repositories>
9698
<repository>
@@ -105,10 +107,17 @@ Add the repository to the `dependencyManagement` section of the pom file:
105107
<updatePolicy>always</updatePolicy>
106108
</snapshots>
107109
</repository>
110+
<repository>
111+
<id>JitPack</id>
112+
<url>https://jitpack.io</url>
113+
</repository>
114+
<repository>
115+
<id>Consensys</id>
116+
<url>https://artifacts.consensys.net/public/maven/maven/</url>
117+
</repository>
108118
</repositories>
109119
```
110-
111-
And then add jvm-libp2p as a dependency:
120+
Add the library to the `dependencies` section of the pom file:
112121
``` xml
113122
<dependency>
114123
<groupId>io.libp2p</groupId>

build.gradle.kts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,14 @@ configure(
153153
publications {
154154
register("mavenJava", MavenPublication::class) {
155155
from(components["java"])
156+
versionMapping {
157+
usage("java-api") {
158+
fromResolutionOf("runtimeClasspath")
159+
}
160+
usage("java-runtime") {
161+
fromResolutionResult()
162+
}
163+
}
156164
artifact(sourcesJar.get())
157165
artifact(dokkaJar.get())
158166
groupId = "io.libp2p"

versions.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
dependencyManagement {
2+
// https://docs.spring.io/dependency-management-plugin/docs/current/reference/html/#pom-generation-disabling
3+
generatedPomCustomization {
4+
enabled = false
5+
}
26
dependencies {
37

48
dependency "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4"

0 commit comments

Comments
 (0)