Actually my app is nearly so far, that some people can test it. Now I want to a version number for the app. Where should I put the the version.properties or is there a built-in mechanism?
Thanks
As to best practices, you can use a very nice approach to manage version code and name described here https://plus.google.com/+JakeWharton/posts/6f5TcVPRZij by Jake Wharton.
Basically, you can update your build.gradle to generate versionCode and versionName based on your major, minor and patch version numbers. (Code copied from the link for convenience.)
def versionMajor = 3
def versionMinor = 0
def versionPatch = 0
def versionBuild = 0 // bump for dogfood builds, public betas, etc.
android {
defaultConfig {
...
versionCode versionMajor * 10000 + versionMinor * 1000 + versionPatch * 100 + versionBuild
versionName "${versionMajor}.${versionMinor}.${versionPatch}"
...
}
...
}
Inside your Manifest you should have this:
android:versionCode="1"
android:versionName="1.0"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With