Skip to content

Commit fb429e5

Browse files
committed
Improve documentation of settings
1 parent 4c8010c commit fb429e5

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

README.md

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ The code is generated by combining each version part with a multiplier. Unspecif
5252

5353
Intermediate versions do *not* produce a new code. The code only advances when a new version tag is specified.
5454

55-
You can configure this behavior with `multipler` and `parts` properties, but be warned that changing the version code scheme for a released Android project can cause problems if your new version code does not [increase monotonically](http://developer.android.com/tools/publishing/versioning.html).
55+
You can configure this behavior with `multiplier` and `parts` properties, but be warned that changing the version code scheme for a released Android project can cause problems if your new version code does not [increase monotonically](http://developer.android.com/tools/publishing/versioning.html).
5656

5757
## Methods
5858

@@ -86,12 +86,12 @@ androidGitVersion {
8686
```
8787

8888
### prefix (string)
89-
Set a tag prefix to indicate that relevant version tags will start with the specified string. For example, with `prefix 'lib'`, a tags like `lib-1.5` will be found while a tag like `1.0` or `app-2.4.2` will be ignored.
89+
`prefix` sets the required prefix for any relevant version tag. For example, with `prefix 'lib'`, the tag `lib-1.5` is used to determine the version, while tags `1.0` are `app-2.4.2` are ignored.
9090

91-
The default for prefix is `''` which matches all numeric version tags.
91+
The default prefix is `''`, which matches all numeric version tags.
9292

9393
### onlyIn (string)
94-
Set the onlyIn path to indicate a path within your project. Commits that change files in this path will count, while other commits will not. This is useful when building a versioned library from a git project containing other projects (apps and other libraries).
94+
`onlyIn` sets the required path for relevant files. Commits that change files in this path will count, while other commits will not.
9595

9696
For example, consider this directory tree:
9797
```
@@ -105,12 +105,12 @@ For example, consider this directory tree:
105105
+-- build.gradle
106106
+-- src/
107107
```
108-
If a commit is tagged with `1.0.1`, and `my-app/lib/build.gradle` is configured with `onlyIn 'lib'`, then commits that change `my-app/build.gradle` or `my-app/app/src` will not affect the version name or code generated from `my-app/lib/build.gradle`.
108+
If `my-app/lib/build.gradle` is configured with `onlyIn 'lib'`, then changes to files in other paths (like `my-app/build.gradle` or `my-app/app/src`) will not affect the version name.
109109

110-
The default onlyIn path is `''`, which includes all commits that change files.
110+
The default onlyIn path is `''`, which includes all paths.
111111

112112
### multiplier (int)
113-
Changes the multipler used to combine each part of the version number.
113+
`multiplier` sets the space allowed each part of the version when calculating the version code.
114114

115115
For example, if you want version 1.2.3 to have a version code of 100020003 (allowing for 9999 patch increments), use `multiplier 10000`.
116116

@@ -119,7 +119,7 @@ Use caution when increasing this value, as the maximum version code is 214748364
119119
The default multiplier is 1000.
120120

121121
### parts (int)
122-
Changes the assumed number of parts.
122+
`parts` sets the number of parts the version number will have.
123123

124124
For example, if you know your product will only ever use two version number parts (1.2) then use `parts 2`.
125125

@@ -128,15 +128,14 @@ Use caution when increasing this value, as the maximum version code is 214748364
128128
The default number of parts is 3.
129129

130130
### baseCode (int)
131-
A base version code added to all generated version codes. Use this when you have already released a version with a code, and don't want to go backwards.
131+
`baseCode` set a floor for all generated version codes. Use this when you have already released a version with a code, and don't want to go backwards.
132132

133133
The default baseCode is 0.
134134

135135
### hideBranches (list of strings)
136+
`hideBranches` sets the branches which should *not* be mentioned explicitly when building intermediate versions (that is, versions without a tag). This will result in somewhat cleaner intermediate version names.
136137

137-
A list of branches which should *not* be added to builds for intermediate (non-tagged) commits. This will result in somewhat cleaner intermediate version names.
138-
139-
The default hideBranches are `[ 'master', 'release' ]`.
138+
The default hideBranches are `[ 'master', 'release' ]`, meaning that intermediate builds will not show these branch names.
140139

141140
## License
142141

0 commit comments

Comments
 (0)