You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you do not provide such a configuration (or fill only partial configuration) the following defaults will be used
121
110
-_strategy_: `CONFIGURABLE`
122
111
-_mavenLike_: `false`
@@ -138,20 +127,7 @@ If you do not provide such a configuration (or fill only partial configuration)
138
127
- the pattern must be a regular Java [Pattern](https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html) string with one matching group
139
128
- distanceCalculatorKind: `FIRST_PARENT`
140
129
141
-
#### version < 0.2.0
142
-
143
-
Before `0.2.0` no configuration was possible.
144
-
The plugin used [jgitver](https://github.com/McFoggy/jgitver) with the following settings:
145
-
146
-
-_mavenLike_: `false`
147
-
-_autoIncrementPatch_: `true`
148
-
-_nonQualifierBranches_: `'master'`
149
-
-_useDistance_: `true`
150
-
-_useGitCommitId_: `false`
151
-
152
-
#### Configuration examples
153
-
154
-
##### provide specific branch policies
130
+
#### Example to provide specific branch policies
155
131
156
132
Given the following configuration
157
133
```
@@ -176,9 +152,9 @@ $ gradlew version
176
152
Version: 1.0.1-3-LOGINPAGE
177
153
```
178
154
179
-
###Metadatas
155
+
#### Add metadata
180
156
181
-
Since `0.3.0`, jgitver[Metadatas](https://github.com/jgitver/jgitver/blob/master/src/main/java/fr/brouillard/oss/jgitver/metadata/Metadatas.java#L25) are exposed via gradle extension properties using the Metadata name in lower case.
157
+
Jgitver[Metadatas](https://github.com/jgitver/jgitver/blob/master/src/main/java/fr/brouillard/oss/jgitver/metadata/Metadatas.java#L25) are exposed via gradle extension properties using the Metadata name in lower case.
182
158
183
159
For example, one could enhance it's jar Manifest with the git commit id using:
184
160
@@ -195,10 +171,10 @@ jar {
195
171
}
196
172
```
197
173
198
-
### Building on detached HEAD
174
+
####Building on detached HEAD
199
175
200
176
When working on a __detached HEAD__, as often on CI environments behind a SCM webhook, no branch information exists anymore from git.
201
-
Since `0.4.1` it now possible to provide externally the branch information via a system property or an environment variable.
177
+
It is possible to provide externally the branch information via a system property or an environment variable.
202
178
203
179
- all operating systems/shells: `gradlew version -Djgitver.branch=mybranch`
204
180
- bash only (_zsh?_) one line: `JGITVER_BRANCH=mybranch && gradlew version`
@@ -212,32 +188,26 @@ Since `0.4.1` it now possible to provide externally the branch information via a
212
188
## Local build & sample test project
213
189
214
190
-`$ ./gradlew install version` will install the current version inside the local maven repository and will print the published version
215
-
- minimal test project `build.gradle` file
191
+
- minimal test project `build.gradle.kts` file
216
192
````gradle
217
-
buildscript {
218
-
repositories {
193
+
plugins {
194
+
id("fr.brouillard.oss.gradle.jgitver") version "0.9.1"
0 commit comments