Skip to content

Commit

Permalink
✨ Adds p4a --numeric-version support
Browse files Browse the repository at this point in the history
This flag is available in p4a and can be useful to have buildozer side too.
Also refs kivy#1079
  • Loading branch information
AndreMiras committed May 27, 2020
1 parent 43214d4 commit a815afc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions buildozer/default.spec
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,10 @@ fullscreen = 0
# (str) The Android arch to build for, choices: armeabi-v7a, arm64-v8a, x86, x86_64
android.arch = armeabi-v7a

# (int) overrides automatic versionCode computation (used in build.gradle)
# this is not the same as app version and should only be edited if you know what you're doing
# android.numeric_version = 1

#
# Python for android (p4a) specific
#
Expand Down
5 changes: 5 additions & 0 deletions buildozer/targets/android.py
Original file line number Diff line number Diff line change
Expand Up @@ -1143,6 +1143,11 @@ def build_package(self):
if launch_mode:
build_cmd += [("--activity-launch-mode", launch_mode)]

# numeric version
numeric_version = config.getdefault('app', 'android.numeric_version')
if numeric_version:
build_cmd += [("--numeric-version", numeric_version)]

# build only in debug right now.
if self.build_mode == 'debug':
build_cmd += [("debug", )]
Expand Down

0 comments on commit a815afc

Please sign in to comment.