diff --git a/admin/admin.el b/admin/admin.el index 8fc970ed430..12891bc8c48 100644 --- a/admin/admin.el +++ b/admin/admin.el @@ -122,6 +122,13 @@ Root must be the root of an Emacs source tree." (rx (and "AC_INIT" (1+ (not (in ?,))) ?, (0+ space) ?\[ (submatch (1+ (in "0-9.")))))) + (set-version-in-file root "java/incrementing-version-code" + (apply #'format "%02d%02d%02d000" + (mapcar #'string-to-number + (split-string version "\\."))) + (rx (and line-start + (submatch (1+ (in digit))) + line-end))) (set-version-in-file root "nt/README.W32" version (rx (and "version" (1+ space) (submatch (1+ (in "0-9.")))))) diff --git a/java/incrementing-version-code b/java/incrementing-version-code new file mode 100644 index 00000000000..fed5b627275 --- /dev/null +++ b/java/incrementing-version-code @@ -0,0 +1,12 @@ +; This file contains an Android version code +; (https://developer.android.com/studio/publish/versioning#versioningsettings) +; corresponding to the current Emacs version. +; +; The version code in AndroidManifest.xml.in is hard-coded to a fixed +; value, to make package downgrades possible. Where an incrementing +; version code is required (for example, for automated F-Droid package +; builds (https://f-droid.org/packages/org.gnu.emacs/)), the version +; code in this file should be referred to and patched in to +; AndroidManifest.xml. + +300093000