From 2830cd7aa296ff5d953f6f3ba2475803df4ef0ac Mon Sep 17 00:00:00 2001 From: Stefan Bratanov Date: Tue, 22 Aug 2023 14:01:31 +0100 Subject: [PATCH 1/2] Disable customization of the generated pom (#308) --- build.gradle.kts | 8 ++++++++ versions.gradle | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/build.gradle.kts b/build.gradle.kts index 64ce8367..57450113 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" From 09cb73d0d9bf73f44370d52bb662d58cf244cdbe Mon Sep 17 00:00:00 2001 From: Stefan Bratanov Date: Tue, 22 Aug 2023 20:14:15 +0100 Subject: [PATCH 2/2] Add all required repositories to the README (#309) --- README.md | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) 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