Gradle versionNameSuffix property
Closed this issue ยท 3 comments
Hi! ๐ Here I am with an other request.
So far I am loving this plugin, it really simplifies our versioning process.
What I would like to add is support for the Gradle versionNameSuffix
property.
For example in our case we have multiple versions of the same app, based on different flavours. Currently the APK output file is different for each flavor but this information is lost once an app is installed. It would help us a lot if optionally the versionNameSuffix
if set is added at the end of the version name.
https://google.github.io/android-gradle-dsl/current/com.android.build.gradle.internal.dsl.ProductFlavor.html#com.android.build.gradle.internal.dsl.ProductFlavor:versionNameSuffix
For example:
flavorDimensions "flavor"
productFlavors {
free {
dimension "flavor"
}
pro {
dimension "flavor"
versionNameSuffix "-Pro"
}
}
Once build and the last git tag was v0.6.0
the version names will be:
free
-> v0.6.0
pro
-> v0.6.0-Pro
This helps us a lot if end-users are having issues and they can help us pinpoint it to a specific version and build flavor.
Seems totally reasonable. ๐ Not sure why that isn't the default in the AGP APIs.
In the spirit of Hacktoberfest I tried to look into it, first time looking at Gradle plugin api, but couldn't find a way to get the versionNameSuffix ๐
Better late than never right ๐