Add manifestPlaceholders feature

This commit is contained in:
Mirko Galimberti 2020-08-19 18:25:30 +02:00 committed by Mirko
parent 3e008a4609
commit b60055cdc0
2 changed files with 12 additions and 0 deletions

View file

@ -235,6 +235,12 @@ android.allow_backup = True
# (str) XML file for custom backup rules (see official auto backup documentation)
# android.backup_rules =
# (str) If you need to insert variables into your AndroidManifest.xml file,
# you can do so with the manifestPlaceholders property.
# This property takes a map of key-value pairs. (via a string)
# Usage example : android.manifest_placeholders = [myCustomUrl:\"org.kivy.customurl\"]
# android.manifest_placeholders = [:]
#
# Python for android (p4a) specific
#

View file

@ -897,6 +897,12 @@ class TargetAndroid(Target):
cmd.append('--depend')
cmd.append(gradle_dependency)
# support for manifestPlaceholders
manifest_placeholders = self.buildozer.config.getdefault('app', 'android.manifest_placeholders', '[:]')
if manifest_placeholders:
cmd.append('--manifest-placeholders')
cmd.append("{}".format(manifest_placeholders))
cmd.append('--arch')
cmd.append(self._arch)