Skip to content

Commit c6613da

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 45ce3ad commit c6613da

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
@@ -149,11 +149,20 @@ task. **Note** that **building will fail** if code is not properly formatted.
149149
./gradlew spotlessApply
150150
```
151151

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

155155
```bash
156-
./gradlew -Pversion=XXXX publishToMavenLocal
156+
./gradlew publishToMavenLocal
157+
```
158+
159+
Note that for using Maven Local artifacts in target projects, you need to add `mavenLocal()` repository.
160+
161+
```kotlin
162+
repositories {
163+
mavenLocal()
164+
mavenCentral()
165+
}
157166
```
158167

159168
</details>

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-core

0 commit comments

Comments
 (0)