breezmobile icon indicating copy to clipboard operation
breezmobile copied to clipboard

versionCode value is static 1 instead of updated for each release

Open emanuelb opened this issue 3 years ago • 2 comments

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:

  1. won't enable manual apk update of locally built apks (will need to remove apk and then install it again)
  2. 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.

emanuelb avatar Aug 11 '22 15:08 emanuelb

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.

yaslama avatar Aug 11 '22 18:08 yaslama

@emanuelb are we ok with this?

kingonly avatar Aug 11 '22 19:08 kingonly