Igalia / wolvic

A fast and secure browser for standalone virtual-reality and augmented-reality headsets.
https://wolvic.org
Mozilla Public License 2.0
796 stars 100 forks source link

Auto-generate app version code #1346

Closed HoussemNasri closed 5 months ago

HoussemNasri commented 5 months ago

Closes #977

I also introduced and documented a property in user.properties to enable switching between static and auto-generated version code. Using a static version code leads to more cache efficiency as Gradle tasks that depend on the version code wouldn't have to re-run and can use the cached task results.

https://developer.android.com/build/optimize-your-build#use_static_build_properties

felipeerias commented 5 months ago

Thank you for the PR @HoussemNasri

I am not sure that there is a significant improvement in performance, because the version code in main is updated rarely. Typically we only increase it whenever we release a new version, every couple of months or so.

Have you ran into performance issues while creating debug builds?

svillar commented 5 months ago

Thank you for the PR @HoussemNasri

I am not sure that there is a significant improvement in performance, because the version code in main is updated rarely. Typically we only increase it whenever we release a new version, every couple of months or so.

Have you ran into performance issues while creating debug builds?

There is no performance gain. I think what @HoussemNasri means is that if we change to dynamically generated version codes then each build will be a full build because the code will be different. For releases that is not a problem but it's for local builds. That's why we need a fixed version code for local builds in order to have incremental local builds. I'd suggest having a large number to ensure that a local build does always superseed a released package version.