Skip to content

Commit

Permalink
Merge pull request #310 from libp2p/1.0.0-hotfix_2
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanBratanov authored Aug 22, 2023
2 parents e4e6b4c + 5d38203 commit 115a481
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 4 deletions.
17 changes: 13 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
<repositories>
<repository>
Expand All @@ -105,10 +107,17 @@ Add the repository to the `dependencyManagement` section of the pom file:
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
<repository>
<id>JitPack</id>
<url>https://jitpack.io</url>
</repository>
<repository>
<id>Consensys</id>
<url>https://artifacts.consensys.net/public/maven/maven/</url>
</repository>
</repositories>
```

And then add jvm-libp2p as a dependency:
Add the library to the `dependencies` section of the pom file:
``` xml
<dependency>
<groupId>io.libp2p</groupId>
Expand Down
8 changes: 8 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 4 additions & 0 deletions versions.gradle
Original file line number Diff line number Diff line change
@@ -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"
Expand Down

0 comments on commit 115a481

Please sign in to comment.