Second draft.
This commit is contained in:
parent
d0092f853d
commit
a4869e9b04
1 changed files with 28 additions and 2 deletions
28
README.md
28
README.md
|
@ -1,6 +1,8 @@
|
|||
[](http://opensource.org/licenses/BSD-3-Clause) [](https://circleci.com/gh/ethauvin/semver-gradle/tree/master)
|
||||
|
||||
A [Semantic Version](https://semver.org) Plugin for [Gradle](https://gradle.org) that manages a project version via a properties file, and provide tasks to automatically increase major, minor and patch build numbers.
|
||||
# Semantic Version Plugin for Gradle
|
||||
|
||||
A [Semantic Version](https://semver.org) Plugin for [Gradle](https://gradle.org) that manages a project version via a properties file, and provide tasks to __automatically increment__ major, minor and patch build numbers.
|
||||
|
||||
## Using the plugin
|
||||
|
||||
|
@ -60,6 +62,26 @@ Property | Description | Default
|
|||
`version.buildMeta ` | The build metatdata version |
|
||||
`version.preReleasePrefix` | The pre-release prefix | `-`
|
||||
`version.buildMetaPrefix ` | The build metadata prefix | `+`
|
||||
`version.separator` | The version separator. | `.`
|
||||
|
||||
The version number is built as follows:
|
||||
|
||||
|
||||
`version.major` `version.separtor` `version.minor` `version.separator` `version.preReleasePrefix` `version.preRelease` `version.buildMetaPrefix` `version.buildMeta`
|
||||
|
||||
for example:
|
||||
|
||||
```ini
|
||||
#version.properties
|
||||
version.major=1
|
||||
version.minor=0
|
||||
version.patch=0
|
||||
version.preRelease=beta
|
||||
version.buildMeta=exp.sha.5114f85
|
||||
```
|
||||
|
||||
`projet.version` will be `1.0.0-beta+exp.sha.5114f85` in Gradle.
|
||||
|
||||
|
||||
### Semver Task
|
||||
|
||||
|
@ -108,3 +130,7 @@ Properties | Description | Default
|
|||
`buildMetaKey` | The build metadata property key. | `version.buildMeta`
|
||||
`buildMetaPrefixKey` | The build metadata prefix property key. | `version.buildMetaPrefix`
|
||||
`separatorKey` | The separator property key. | `version.separator`
|
||||
|
||||
## Source Code Generation
|
||||
|
||||
If you'd like to incorporate the version number data into your source code, please have a look at my [Semantic Version Annotation Processor](https://github.com/ethauvin/semver).
|
Loading…
Add table
Add a link
Reference in a new issue