In the below task, based on the branch, how do I specify a different value for assembleQaDebug. If the branch is qa it has to be assembleQaDebug; if develop, it has to be assembleDevelopDebug . And if prod branch, it has to be assembleProdRelease. What is the best approach doing this, if there is one. Any help is much appreciated.
- task: Gradle@3
displayName: 'Build Task'
continueOnError: false
inputs:
tasks: assembleQaDebug -PversionCode=$(Build.BuildId) -PdisablePreDex --no-daemon
publishJUnitResults: false
2
Answers
The values has to be specified in ‘variables’ section:
Like this you can add your variables and depending on your stage you can replace the values.
Not sure if it’s the best way to do this, but I love using variables for those kind of use cases, so check this one :