I want to change version name for app flavors but only if it\'s a debug build.
(e.g. debug builds will have versions like 1.0.1 D (DEBUG) 555 or 1.0.1 P (DEBUG) 555
I wanted to set a different versionName for debug build:
android { applicationVariants.all { variant -> variant.outputs.all { output -> if (variant.buildType.name == 'debug') { output.versionNameOverride = "1" } } } }