Skip to content

Commit 82ff62e

Browse files
Hardcode 0.0.0-SNAPSHOT as version placeholder
Versions are assigned in CI/CD workflows by -Pversion=${GIT_TAG#v}. This way version always aligns with Git tags, and for local development, one can use 0.0.0-SNAPSHOT from maven local for if necessary.
1 parent cf576d2 commit 82ff62e

2 files changed

Lines changed: 13 additions & 3 deletions

File tree

README.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,11 +243,20 @@ task. **Note** that **building will fail** if code is not properly formatted.
243243
./gradlew spotlessApply
244244
```
245245

246-
To publish the built artifacts to local Maven repository, run following command, replacing `XXXX` with the desired
247-
version. By default, the version is `unspecified` (Gradle's default).
246+
To publish the built artifacts to local Maven repository, use `publishToMavenLocal` task. It produces artifacts with
247+
`0.0.0-SNAPSHOT` version placeholder, so they won't conflict with any released versions in your local repository.
248248

249249
```bash
250-
./gradlew -Pversion=XXXX publishToMavenLocal
250+
./gradlew publishToMavenLocal
251+
```
252+
253+
Note that for using Maven Local artifacts in target projects, you need to add `mavenLocal()` repository.
254+
255+
```kotlin
256+
repositories {
257+
mavenLocal()
258+
mavenCentral()
259+
}
251260
```
252261

253262
---

gradle.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ org.gradle.workers.max=4
55
#
66
# Project settings
77
group=io.github.problem4j
8+
version=0.0.0-SNAPSHOT
89
#
910
# Project internal settings
1011
internal.pom.url=https://github.com/problem4j/problem4j-jackson

0 commit comments

Comments
 (0)