Skip to content

Commit fb7254c

Browse files
committed
nit
1 parent 01d4bce commit fb7254c

File tree

3 files changed

+71
-17
lines changed

3 files changed

+71
-17
lines changed

README.md

Lines changed: 44 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ mvn -v
1414
java -version
1515
```
1616

17-
## Maven dependency (JitPack)
17+
## Maven demo
1818

19-
Add the JitPack repository to your `pom.xml` and use the exact coordinates published for this project. The project exposes the artifact as `JavaFastPFOR` with a tag-style version. For example:
19+
We added the JitPack repository to our `pom.xml` and use the exact coordinates published for this project. The project exposes the artifact as `JavaFastPFOR` with a tag-style version. For example:
2020

2121
```xml
2222
<repositories>
@@ -29,28 +29,21 @@ Add the JitPack repository to your `pom.xml` and use the exact coordinates publi
2929
<dependency>
3030
<groupId>com.github.fast-pack</groupId>
3131
<artifactId>JavaFastPFOR</artifactId>
32-
<version>JavaFastPFOR-0.3.0</version>
32+
<version>JavaFastPFOR-0.3.1</version>
3333
</dependency>
3434
```
3535

36-
Note: coordinates are case-sensitive. Using `JavaFastPFor` (different case) or a short `0.3.0` version may fail if that exact artifact/version was not published.
36+
Note: coordinates are case-sensitive. Using `JavaFastPFor` (different case) or a short `0.3.1` version may fail if that exact artifact/version was not published.
3737

38-
## Build
38+
### Build
3939

4040
Download dependencies and compile:
4141

4242
```bash
43-
mvn -U package
43+
mvn package
4444
```
4545

46-
If Maven cached a failed resolution you can clear the specific cached artifact and retry:
47-
48-
```bash
49-
rm -rf ~/.m2/repository/com/github/fast-pack/JavaFastPFOR
50-
mvn -U package
51-
```
52-
53-
## Run the demo
46+
### Run the demo
5447

5548
Run the `Main` class included in this project:
5649

@@ -66,7 +59,41 @@ first 20 original: [0, 0, 0, ...]
6659
first 20 recovered: [0, 0, 0, ...]
6760
```
6861

69-
## Troubleshooting
7062

71-
- "Could not find artifact ..." when building: check that the `artifactId` and `version` in your `pom.xml` exactly match what JitPack exposes (case-sensitive). Use the repository page `https://jitpack.io/#fast-pack/JavaFastPFOR` to inspect available versions/tags.
72-
- If JitPack builds are failing for a tag, try using the exact commit hash or `master-SNAPSHOT` while debugging.
63+
## Gradle
64+
65+
This project also includes a Gradle build.
66+
67+
```
68+
69+
repositories {
70+
mavenCentral()
71+
maven { url 'https://jitpack.io' }
72+
}
73+
74+
dependencies {
75+
implementation 'com.github.fast-pack:JavaFastPFOR:JavaFastPFOR-0.3.1'
76+
}
77+
```
78+
79+
80+
It uses the JitPack repository and the same dependency coordinates.
81+
82+
Build with Gradle:
83+
84+
```bash
85+
./gradlew clean build
86+
```
87+
88+
Run the demo with Gradle:
89+
90+
```bash
91+
./gradlew run
92+
```
93+
94+
If you don't have the wrapper, you can use a local Gradle installation:
95+
96+
```bash
97+
gradle clean build
98+
gradle run
99+
```

build.gradle

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
plugins {
2+
id 'java'
3+
id 'application'
4+
}
5+
6+
java {
7+
toolchain {
8+
languageVersion = JavaLanguageVersion.of(21)
9+
}
10+
}
11+
12+
repositories {
13+
mavenCentral()
14+
maven { url 'https://jitpack.io' }
15+
}
16+
17+
dependencies {
18+
implementation 'com.github.fast-pack:JavaFastPFOR:JavaFastPFOR-0.3.0'
19+
}
20+
21+
application {
22+
mainClass = 'org.example.Main'
23+
}
24+
25+
// Note: Java toolchain is configured above; explicit sourceCompatibility/targetCompatibility
26+
// are not required at the project root for modern Gradle versions.

settings.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
rootProject.name = 'javafastpfor-demo'

0 commit comments

Comments
 (0)