Support checkupdate for dynamically generated versioncodes/versionnames

This is a problem for a few apps. Labcoat comes to mind, but his has come up more often, it's also mentioned in the manual for UpdateCheckMode: None.

This will probably happen slightly more often in the future as this is a standard feature of gradle to run custom calculations, git-describe commands or sourcing other files in the build.gradle files and peopel start using these.

There are 2 possible solutions I can think of, both not that great, but maybe someone has another idea.

  1. Hook into the gradle build process to be able to query this information without doing a normal build. Gradle is very extensible so I suppose this should be possible to achieve with some plugin. But no idea how, or even if this really is possible.
  2. Provide an UpdateCheckMode: Build which performs a normal build and reads the resulting information from the resulting apk. This is very expensive and so probably cannot be integrated into the main checkupdates process. (Side question: where is this actually run? On the build server? Automatically? Manually by @CiaranG? Can someone shed some light on this process?)

But his could still be set in the metadata and run on a different server, or less often.

It probably has to be done in some kind of sandbox per app as running a build can run arbitrary command as the user running fdroid on a system.

Any other ideas?

Edited by Marcus