Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add version shield to README #197

Merged
merged 1 commit into from
Oct 11, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 25 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,21 +60,29 @@ etc. and other subsystems or concepts that are internal to implementations and
do not impact the ability to hold communications with other libp2p processes.

## Adding as a dependency to your project:
![Maven version](https://img.shields.io/maven-metadata/v?label=jvm-libp2p-minimal&metadataUrl=https%3A%2F%2Fdl.cloudsmith.io%2Fpublic%2Flibp2p%2Fjvm-libp2p%2Fmaven%2Fio%2Flibp2p%2Fjvm-libp2p-minimal%2Fmaven-metadata.xml)

[![Hosted By: Cloudsmith](https://img.shields.io/badge/OSS%20hosting%20by-cloudsmith-blue?logo=cloudsmith&style=flat-square)](https://cloudsmith.com)
Hosting of artefacts is graciously provided by [Cloudsmith](https://cloudsmith.com).

### Using Gradle
Add the Cloudsmith repository to the `repositories` section of your Gradle file.
```groovy
repositories {
// ...
maven { url "https://dl.cloudsmith.io/public/libp2p/jvm-libp2p/maven/" }
}
```
repositories {
maven { url "https://dl.cloudsmith.io/public/libp2p/jvm-libp2p/maven/" }
}

implementation 'io.libp2p:jvm-libp2p-minimal:0.7.0-RELEASE'
Add the library to the `implementation` part of your Gradle file.
```groovy
dependencies {
// ...
implementation 'io.libp2p:jvm-libp2p-minimal:X.Y.Z-RELEASE'
}
```
### Using Maven
Add the repository to the `dependencyManagement` section of the pom file:
```
```xml
<repositories>
<repository>
<id>libp2p-jvm-libp2p</id>
Expand All @@ -92,13 +100,13 @@ Add the repository to the `dependencyManagement` section of the pom file:
```

And then add jvm-libp2p as a dependency:
```
<dependency>
<groupId>io.libp2p</groupId>
<artifactId>jvm-libp2p-minimal</artifactId>
<version>0.7.0-RELEASE</version>
<type>pom</type>
</dependency>
``` xml
<dependency>
<groupId>io.libp2p</groupId>
<artifactId>jvm-libp2p-minimal</artifactId>
<version>X.Y.Z-RELEASE</version>
<type>pom</type>
</dependency>
```


Expand All @@ -110,17 +118,16 @@ To build the library you will need just

For building a stable release version clone the `master` branch:
```bash
> git clone https://github.com/libp2p/jvm-libp2p -b master
git clone https://github.com/libp2p/jvm-libp2p -b master
```
For building a version with the latest updates clone the `develop` (default) branch:
```bash
> git clone https://github.com/libp2p/jvm-libp2p
git clone https://github.com/libp2p/jvm-libp2p
```

To build the library:
To build the library from the `jvm-libp2p` folder, run:
```bash
> cd jvm-libp2p
> ./gradlew build
./gradlew build
```

After the build is complete you may find the library `.jar` file here: `jvm-libp2p/build/libs/jvm-libp2p-minimal-0.x.y-RELEASE.jar`
Expand Down