Skip to content

Commit

Permalink
Add Maven dependency information
Browse files Browse the repository at this point in the history
  • Loading branch information
lukechen116 authored Dec 6, 2023
1 parent 96d3359 commit 106730b
Showing 1 changed file with 23 additions and 4 deletions.
27 changes: 23 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# [Sqids Java](https://sqids.org/java)
[![javadoc](https://javadoc.io/badge2/org.sqids/sqids/javadoc.svg)](https://javadoc.io/doc/org.sqids/sqids)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.sqids/sqids/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.sqids/sqids)


[Sqids](https://sqids.org/java) (*pronounced "squids"*) is a small library that lets you **generate unique IDs from
numbers**. It's good for link shortening, fast & URL-safe ID generation and decoding back into numbers for quicker
Expand Down Expand Up @@ -34,14 +37,30 @@ Java 8 or higher is required.

## 🚀 Getting started

Download and Import Sqids via:
Import dependency. If you are using Apache Maven, add the following dependency to your pom.xml's dependencies:

```
<dependency>
<groupId>org.sqids</groupId>
<artifactId>sqids</artifactId>
<version>0.1.0</version>
</dependency>
```

Alternatively, if you use Gradle or are on Android, add the following to your app's `build.gradle` file under dependencies:

```java
import org.sqids.Sqids;
```
implementation 'org.sqids:sqids:0.1.0'
```

## 👩‍💻 Examples

Import Sqids via:

```java
import org.sqids.Sqids;
```

Simple encode & decode:

```java
Expand Down Expand Up @@ -87,4 +106,4 @@ List<Long> numbers=sqids.decode(id); // [1, 2, 3]

## 📝 License

[MIT](LICENSE)
[MIT](LICENSE)

0 comments on commit 106730b

Please sign in to comment.