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
Copy file name to clipboardExpand all lines: README.md
+11-12Lines changed: 11 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,7 +52,7 @@ The code is generated by combining each version part with a multiplier. Unspecif
52
52
53
53
Intermediate versions do *not* produce a new code. The code only advances when a new version tag is specified.
54
54
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).
56
56
57
57
## Methods
58
58
@@ -86,12 +86,12 @@ androidGitVersion {
86
86
```
87
87
88
88
### 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.
90
90
91
-
The default for prefix is `''` which matches all numeric version tags.
91
+
The default prefix is `''`, which matches all numeric version tags.
92
92
93
93
### 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.
95
95
96
96
For example, consider this directory tree:
97
97
```
@@ -105,12 +105,12 @@ For example, consider this directory tree:
105
105
+-- build.gradle
106
106
+-- src/
107
107
```
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.
109
109
110
-
The default onlyIn path is `''`, which includes all commits that change files.
110
+
The default onlyIn path is `''`, which includes all paths.
111
111
112
112
### 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.
114
114
115
115
For example, if you want version 1.2.3 to have a version code of 100020003 (allowing for 9999 patch increments), use `multiplier 10000`.
116
116
@@ -119,7 +119,7 @@ Use caution when increasing this value, as the maximum version code is 214748364
119
119
The default multiplier is 1000.
120
120
121
121
### parts (int)
122
-
Changes the assumed number of parts.
122
+
`parts` sets the number of parts the version number will have.
123
123
124
124
For example, if you know your product will only ever use two version number parts (1.2) then use `parts 2`.
125
125
@@ -128,15 +128,14 @@ Use caution when increasing this value, as the maximum version code is 214748364
128
128
The default number of parts is 3.
129
129
130
130
### 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.
132
132
133
133
The default baseCode is 0.
134
134
135
135
### 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.
136
137
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.
0 commit comments