-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstep.yml
More file actions
114 lines (89 loc) · 4.45 KB
/
step.yml
File metadata and controls
114 lines (89 loc) · 4.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
title: Change Android versionCode and versionName
summary: Updates the Android versionCode and versionName in your project's `build.gradle` file.
description: |-
Modifies the version information of your Android app by updating versionCode and versionName attributes in your project's `build.gradle` file before you'd publish your app to Google Play Store.
### Configuring the Step
1. Insert the **Change Android versionCode and versionName** Step before a build Step such as **Android Build** or **Gradle Runner** in your Workflow.
2. Click the Step to modify its input fields.
3. Add the file path to the **Path to the build.gradle file** so that the Step knows where to find the file that contains the versionCode and versionName attributes.
4. Provide a new versionName in the **New versionName** input. If you leave this input empty, the previous versionName will be displayed on Google Play Store. The input's value must be a string in this format `<major>.<minor>.<point>`.
5. Provide a versionCode in the **New versionCode** input to track app versions. If you leave this input empty, you will release your app with the version that is already set in the `build.gradle` file's `versionCode` attribute. The input's value must be an integer.
If you wish to offset the value you set in the **New versionCode** input, then you can use the **versionCode Offset** input to add the offset integer value here. This number will be added to the versionCode's value.
### Troubleshooting
The **Change Android versionCode and versionName** Step must be inserted BEFORE the **Android Build** Step as the former makes sure you upload the build with the right versionCode and versionName to Google Play Store.
### Useful links
- [About Android versionCode and versionNumber](https://developer.android.com/studio/publish/versioning)
- [Build versioning](https://devcenter.bitrise.io/builds/build-numbering-and-app-versioning/)
### Related Steps
- [Android Sign](https://www.bitrise.io/integrations/steps/sign-apk)
- [Android Build](https://www.bitrise.io/integrations/steps/android-build)
- [Gradle Runner](https://www.bitrise.io/integrations/steps/gradle-runner)
website: https://github.com/bitrise-community/steps-change-android-versioncode-and-versionname
source_code_url: https://github.com/bitrise-community/steps-change-android-versioncode-and-versionname
support_url: https://github.com/bitrise-community/steps-change-android-versioncode-and-versionname
host_os_tags:
- osx-10.10
- ubuntu-16.04
project_type_tags:
- android
- react-native
- cordova
- ionic
- flutter
type_tags:
- utility
is_requires_admin_user: true
is_always_run: false
is_skippable: false
run_if: ""
toolkit:
go:
package_name: github.com/bitrise-steplib/steps-change-android-versioncode-and-versionname
inputs:
- build_gradle_path: $BITRISE_SOURCE_DIR/app/build.gradle
opts:
title: Path to the build.gradle file
summary: Path to the build.gradle file shows the versionCode and versionName settings.
is_required: true
- new_version_name:
opts:
title: New versionName
summary: |-
New versionName to set.
For example: 1.0.0
Leave this input empty so that versionName remains unchanged.
description: |-
New versionName to set.
For example: 1.0.0
Leave this input empty so that versionName remains unchanged.
- new_version_code: $BITRISE_BUILD_NUMBER
opts:
title: New versionCode
summary: |-
New versionCode to set.
For example: 1
Leave this input empty to do not modify versionCode.
description: |-
New versionCode to set.
For example: 1
Leave this input empty so that versionCode remains unchanged.
- version_code_offset:
opts:
title: versionCode Offset
summary: |-
Offset value for versionCode.
For example: 1
Leave this input empty if you want the exact value you set in
`New versionCode` input otherwise it will be added to it.
description: |-
Offset value for versionCode.
For example: 1
Leave this input empty if you want the exact value you set in
`New versionCode` input otherwise it will be added to it.
outputs:
- ANDROID_VERSION_NAME:
opts:
title: Final Android versionName in build.gradle file
- ANDROID_VERSION_CODE:
opts:
title: Final Android versionCode in build.gradle file