breezmobile
breezmobile copied to clipboard
versionCode value is static 1 instead of updated for each release
in AndroidManifest.xml file of generated APK that is locally built the versionCode is 1: android:versionCode="1"
cause in ./android/app/build.gradle it set static value of 1:
https://github.com/breez/breezmobile/blob/592d8dfd71c97812aba13ba247fd186dd22f0915/android/app/build.gradle#L36
while downloading APK from github or playstore will have version value like 1656698898, and it will be changed for each version.
static versionCode is problematic cause:
- won't enable manual apk update of locally built apks (will need to remove apk and then install it again)
- fdroid will detect it as error and for workaround will use other assigned number for it that they manage.
thus it make sense to update this value in repo to the correct one used in upcoming version before releasing new app.
versionCode values need to be a fully ordered set but git (as opposed to svn for instance) has no concept of ordered versions, so the best way to handle this discrepancy is to change the versionCode to be the timestamp when building a release version and to let the committed versionCode to be a small constant. If someone wants to reproduce the same binary, she can use the same value which can be easily extracted from the apk file.
@emanuelb are we ok with this?