This is my build.gradle
defaultConfig {
applicationId "com.xyz.abc.na"
minSdkVersion 16
targetSdkVersion 29
versionCode 36
versionName "5.0.2"
multiDexEnabled true
}
In my YML, I have
- task: android-manifest-version@1
displayName: 'Version Update'
inputs:
sourcePath: '$(manifestDirectory)'
versionCodeOption: 'buildid'
versionCode: '$(Build.BuildId)'
versionCodeOffset: '1'
printFile: true
- task: Gradle@2
displayName: 'Building Gradle'
inputs:
workingDirectory: ''
gradleWrapperFile: 'gradlew'
gradleOptions: '-Xmx3072m'
publishJUnitResults: false
testResultsFiles: '**/TEST-*.xml'
tasks: $(gradleTask)
codeCoverageToolOption: 'None'
javaHomeOption: 'JDKVersion'
jdkVersionOption: 'default'
jdkArchitectureOption: 'x64'
checkStyleRunAnalysis: false
findBugsRunAnalysis: false
Unless I manually change the versionCode
and versionName
in my build.gradle the values are never automatically updated.
How do I get the latest value, increment by 1 and update the build.gradle and then generate a build from the new version code and version name?
Below are the existing references that didn't work for me.