Skip to content

Commit

Permalink
Add manifestPlaceholders feature
Browse files Browse the repository at this point in the history
  • Loading branch information
misl6 committed Aug 19, 2020
1 parent 7bf9f39 commit 424bb05
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions buildozer/default.spec
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,12 @@ android.arch = armeabi-v7a
# (bool) enables Android auto backup feature (Android API >=23)
android.allow_backup = True

# (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
#
Expand Down
6 changes: 6 additions & 0 deletions buildozer/targets/android.py
Original file line number Diff line number Diff line change
Expand Up @@ -891,6 +891,12 @@ def execute_build_package(self, build_cmd):
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)

Expand Down

0 comments on commit 424bb05

Please sign in to comment.