Skip to content

Commit 922d46c

Browse files
authored
Merge pull request #66 from piotrrzysko/update_readme_maven
Add information about Maven Central to README
2 parents 58b142e + 8b59184 commit 922d46c

File tree

1 file changed

+37
-29
lines changed

1 file changed

+37
-29
lines changed

README.md

Lines changed: 37 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -104,53 +104,62 @@ non-vectorized implementation. For an example usage, see
104104
examples/vector/Example.java. The feature requires JDK 19+ and is currently for
105105
advanced users.
106106

107-
JavaFastPFOR as a dependency (JitPack)
107+
JavaFastPFOR as a dependency
108108
------------------------
109109

110+
JavaFastPFOR is available both on Maven Central and JitPack, so you can easily
111+
include it in your project using either source.
112+
110113
We have a demo project using JavaFastPFOR as a dependency (both Maven and Gradle). See...
111114

112115
https://github.com/fast-pack/JavaFastPFORDemo
113116

114-
1. **Maven**
117+
### Maven Central
118+
119+
You can add JavaFastPFOR directly from Maven Central — no extra repository configuration needed:
115120

116-
Using this code in your own project is easy with maven, just add
117-
the following code in your pom.xml file:
121+
**Maven**
118122

119123
```xml
120-
<dependency>
121-
<groupId>com.github.fast-pack</groupId>
122-
<artifactId>JavaFastPFor</artifactId>
123-
<version>JavaFastPFOR-0.3.2</version>
124-
</dependency>
124+
<dependency>
125+
<groupId>me.lemire.integercompression</groupId>
126+
<artifactId>JavaFastPFOR</artifactId>
127+
<version>0.3.8</version>
128+
</dependency>
125129
```
126130

127-
as well as jitpack as a repository...
131+
**Gradle (Groovy)**
128132

129-
```xml
130-
<repositories>
131-
<repository>
132-
<id>jitpack.io</id>
133-
<url>https://jitpack.io</url>
134-
</repository>
135-
</repositories>
133+
```groovy
134+
dependencies {
135+
implementation 'me.lemire.integercompression:JavaFastPFOR:0.3.8'
136+
}
136137
```
137138

138-
Naturally, you should replace "version" by the version
139-
you desire.
139+
### JitPack
140140

141+
If you prefer or need to use JitPack, you can include the dependency like this:
141142

142-
2. **Gradle (groovy)**
143+
**Maven**
143144

145+
```xml
146+
<repositories>
147+
<repository>
148+
<id>jitpack.io</id>
149+
<url>https://jitpack.io</url>
150+
</repository>
151+
</repositories>
152+
153+
<dependency>
154+
<groupId>com.github.fast-pack</groupId>
155+
<artifactId>JavaFastPFOR</artifactId>
156+
<version>JavaFastPFOR-0.3.8</version>
157+
</dependency>
158+
```
144159

145-
Then all you need is to edit your `build.gradle` file like so:
146-
160+
**Gradle (groovy)**
147161

148162
```groovy
149-
plugins {
150-
id 'java'
151-
}
152-
153-
154163
repositories {
155164
mavenCentral()
156165
maven {
@@ -159,11 +168,10 @@ repositories {
159168
}
160169
161170
dependencies {
162-
implementation 'com.github.fast-pack:JavaFastPFor:JavaFastPFOR-0.3.2'
171+
implementation 'com.github.fast-pack:JavaFastPFOR:JavaFastPFOR-0.3.8'
163172
}
164173
```
165174

166-
167175
Naturally, you should replace "version" by the version
168176
you desire.
169177

0 commit comments

Comments
 (0)