Skip to content

Commit 106730b

Browse files
authoredDec 6, 2023
Add Maven dependency information
1 parent 96d3359 commit 106730b

File tree

1 file changed

+23
-4
lines changed

1 file changed

+23
-4
lines changed
 

‎README.md

+23-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# [Sqids Java](https://sqids.org/java)
2+
[![javadoc](https://javadoc.io/badge2/org.sqids/sqids/javadoc.svg)](https://javadoc.io/doc/org.sqids/sqids)
3+
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.sqids/sqids/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.sqids/sqids)
4+
25

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

3538
## 🚀 Getting started
3639

37-
Download and Import Sqids via:
40+
Import dependency. If you are using Apache Maven, add the following dependency to your pom.xml's dependencies:
41+
42+
```
43+
<dependency>
44+
<groupId>org.sqids</groupId>
45+
<artifactId>sqids</artifactId>
46+
<version>0.1.0</version>
47+
</dependency>
48+
```
49+
50+
Alternatively, if you use Gradle or are on Android, add the following to your app's `build.gradle` file under dependencies:
3851

39-
```java
40-
import org.sqids.Sqids;
52+
```
53+
implementation 'org.sqids:sqids:0.1.0'
4154
```
4255

4356
## 👩‍💻 Examples
4457

58+
Import Sqids via:
59+
60+
```java
61+
import org.sqids.Sqids;
62+
```
63+
4564
Simple encode & decode:
4665

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

88107
## 📝 License
89108

90-
[MIT](LICENSE)
109+
[MIT](LICENSE)

0 commit comments

Comments
 (0)